supakeys
v0.1.7
Published
Passkey authentication for Supabase - WebAuthn made simple
Maintainers
Readme
supakeys
Passkey authentication for Supabase - WebAuthn made simple.
Installation
npm install supakeys @supabase/supabase-jsSetup
npx supakeys initThis creates the required database migrations and edge function in your Supabase project.
Quick Start
import { createClient } from '@supabase/supabase-js';
import { createPasskeyAuth } from 'supakeys';
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
const passkeys = createPasskeyAuth(supabase, {
rpId: 'your-domain.com',
rpName: 'Your App',
});
// Register a passkey
const { success, passkey } = await passkeys.register({
email: '[email protected]',
});
// Sign in with a passkey
const { success, session } = await passkeys.signIn({
email: '[email protected]',
});Documentation
Full documentation at supakeys.dev
License
MIT
