Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.19 KB

File metadata and controls

46 lines (32 loc) · 1.19 KB

Passkey Authentication Demo

A Next.js application demonstrating passkey step-up authentication with Authsignal.

Features

  • Passkey Enrollment: Register WebAuthn/FIDO2 authenticators
  • Passkey Authentication: Secure login with biometrics or security keys
  • Transaction Verification: Step-up authentication for high-value transactions
  • Enrollment Status: Check if users have passkeys enrolled

Getting Started

  1. Install dependencies:

    pnpm install
  2. Set up environment variables:

    cp .env.example .env.local
    # Add your Authsignal API credentials
  3. Run the development server:

    pnpm dev
  4. Open http://localhost:3000

Demo Credentials

  • Email: demo@example.com
  • Password: password123

API Endpoints

  • POST /api/passkey/check-enrollment - Check if user has passkeys
  • POST /api/passkey/enroll - Start passkey enrollment
  • POST /api/passkey/validate - Validate passkey challenge
  • POST /api/passkey/verify-transaction - Verify high-value transactions

Security

All endpoints require authentication and use server-side user identification to prevent user impersonation attacks.