Live demo

Sign in without a password

This runs the published package against your own authenticator. Nothing is simulated: the assertion your device produces is verified by the same code the documentation describes.

  1. 01 / enrol

    Choose a name

    Anything at all. It is discarded when the process restarts.

  2. 02 / verify

    Create the account

    Your device offers Touch ID, Windows Hello, a phone, or a security key.

  3. 03 / return

    Sign out, then in

    Signing in asks for no username. The browser shows what it holds for this domain.

Disposable by design

Accounts live in an in-memory store and vanish when the server restarts. Your passkey stays on your device, so revoke it in your password manager when you are finished.

Live demo
No session

What is running

Both halves, in full

app/api/passkey/[...passkey]/route.ts
const handler = demoPasskeys.handler({
  basePath: '/api/passkey',
  getSessionUserId: (req) => readSession(req),
  onRegister: (_req, { user }) =>
    ({ 'set-cookie': createSessionCookie(user.id) }),
  onLogin: (_req, { user }) =>
    ({ 'set-cookie': createSessionCookie(user.id) }),
});

export {
  handler as GET, handler as POST,
  handler as PATCH, handler as DELETE,
};
components/demo-console.tsx
configure({ baseUrl: '/api/passkey' });

// Create the account
await register({ username });

// Enter. No username needed.
await login();

// Offer passkeys in the browser's own
// autofill dropdown.
signInWithAutofill().then(refresh);

Both files are reproduced in full on the examples page.

When it works here, the same twelve lines work in your application.