Convex Passkey-auth

Add WebAuthn passkey authentication to Convex apps with self-minted JWTs, biometric login, and React hooks - no external auth providers needed.

Installation

npm install convex-passkey-auth

About Convex Passkey-auth

**Passwordless auth for Convex apps using WebAuthn passkeys.**

Drop in biometric and hardware-key authentication without third-party auth providers.

- Full WebAuthn/FIDO2 registration and authentication flow
- Self-minted JWTs — no external auth service needed
- Multi-device passkey support (phone, laptop, security keys)
- Session management with configurable expiration
- React hooks for seamless frontend integration

Benefits

Use cases

how to add passwordless authentication to Convex app

convex-passkey-auth provides a complete WebAuthn implementation for Convex applications. It handles passkey registration, authentication flows, and JWT generation without requiring external auth services like Auth0 or Firebase Auth.

WebAuthn implementation for React with Convex backend

The component includes React hooks that connect directly to Convex mutations for passkey operations. It manages the complex WebAuthn browser APIs and provides simple hooks for registration, login, and session state management.

self-hosted authentication without third party providers

convex-passkey-auth generates and validates JWTs entirely within your Convex backend. This eliminates dependencies on external authentication services while providing enterprise-grade security through FIDO2 standards.

Frequently asked questions

Does convex-passkey-auth work with existing Convex authentication?

convex-passkey-auth operates independently of Convex's built-in auth system. It generates its own JWTs and manages sessions through Convex functions, allowing you to implement passkey authentication without conflicts with other auth methods.

What browsers and devices support WebAuthn passkeys?

WebAuthn passkeys work in all modern browsers including Chrome, Firefox, Safari, and Edge. Users can authenticate with built-in biometrics (Face ID, Touch ID, Windows Hello), external security keys, or cross-device authentication from their phones.

How does session management work with convex-passkey-auth?

The component includes configurable JWT expiration and refresh token handling through Convex functions. Sessions are stored in your Convex database with automatic cleanup, and React hooks provide real-time authentication state updates.

Can users register multiple passkeys for the same account?

Yes, convex-passkey-auth supports multi-device registration where users can add passkeys from different devices. The component stores multiple credential IDs per user, enabling seamless authentication across phones, laptops, and hardware security keys.

Links