Docs/Start here

Install Auth Dance

Add the core package and the framework bindings your application needs.

Install the core package in the application that owns your authentication routes.

npm install auth-dance

Pick only the entry points you use

The main auth-dance entry point contains the server factory, client, choreography helpers, and shared types. Factor implementations, provider adapters, and framework bindings have dedicated entry points.

import { createAuthDance, sequence } from "auth-dance";
import { PasswordAuthDanceComponent } from "auth-dance/components/password";
import { AuthDanceProvider, useAuthDance } from "auth-dance/react";

Import a provider from its runtime-specific path, such as auth-dance/providers/deno or auth-dance/providers/cloudflare. The memory providers are useful for local examples and process-lifetime development data.

Choose a server runtime

createAuthDance returns a standard fetch handler as well as its Hono app and in-process API. Mount the surface that fits your runtime; the next guide builds a complete configuration.

const auth = createAuthDance(options);

Deno.serve(auth.fetch);