Authentication and Passkey features in the SvelteKit example
masterThe SvelteKit example demonstrates several advanced authentication patterns:
Authentication Patterns
- Progressive Enhancement: Provides email-based one-time codes for users unable to use passkeys.
- Mailbox Verification: Ensures email ownership via verification messages.
- Session Management: Uses Lucia for session handling.
- Re-authentication: Requires users to re-verify for sensitive operations (e.g., account changes).
- Account Management: Allows updating usernames/emails and synchronizing passkeys.
Passkey Patterns
- Two-step Login Flow: Prompts for email first, then drops into passkey authentication, pre-selecting the credential for the identifier.
- Autofill: Uses browser autofill for progressive enhancement.
- Passkey Management: UI for creating and deleting account passkeys.
- Local Device Management: Syncs passkey deletion or account changes with the user's local device/passkey manager.
- Local Re-authentication: Uses device-level verification (e.g., FaceID) for sensitive operations.