WebAuthn Implementation

Stored credential data

  • Persist the public key
  • Persist the signature counter
  • Optionally persist transports
  • Never store the private key
export const passkeys = sqliteTable('passkeys', { publicKey: text('public_key').notNull(), counter: integer('counter').notNull().default(0), transports: text('transports'), });

Registration rules

  • Use @simplewebauthn/server
  • Require residentKey: 'required'
  • Require userVerification: 'required'
  • Prefer platform authenticators for one-click login
authenticatorSelection: { residentKey: 'required', userVerification: 'required', authenticatorAttachment: 'platform', }
Building a Production-Grade Passwordless Authentication System
10 / 12