@rapidrest/auth
npm install @rapidrest/auth
A library for adding a complete authentication system to a RapidREST project: data models, persistence adapters, and HTTP routes for registering and authenticating users via password, TOTP, OTP (email/SMS), WebAuthn passkeys, FIDO2 hardware keys, multi-factor auth, and OpenID Connect / OAuth 2.0. Builds on @rapidrest/service-core's JWTStrategy and AuthMiddleware. For the complete, pre-wired reference deployment built from this library, see Auth Server.
For narrative, task-oriented documentation, start with Auth Library.
Quick links
- Strategies — the 7
AuthStrategyimplementations (BasicStrategy,FIDO2Strategy,MFAStrategy,OIDCStrategy,OTPStrategy,PasskeyStrategy,TOTPStrategy). - Data Models —
User,Alias,Secret,Profile, and their Mongo/SQL variants. - Base Routes — the route classes you subclass to expose auth endpoints.
- Configuration — the full
auth:*config tree, including thesessionblock required by challenge-response flows.
Everything else is in the sidebar, generated directly from source.