White-label APIAuth
Authentication
User registration, login, password reset, and multi-factor authentication.
Authentication
VanityPass provides a complete authentication system for white-label apps: registration, login, password reset, email verification, and MFA support.
Key Endpoints
- Register — Create a new user account
- Login — Authenticate and get JWT token
- Refresh — Get a fresh JWT without re-entering password
- Logout — Invalidate current session
- Change password — Update user password
- MFA setup — Enable multi-factor authentication
- Verify OTP — Confirm MFA code during login
Authentication Flow
- User registers with email/password
- Email verification sent
- User logs in and receives JWT token
- Token valid for 1 hour (use refresh endpoint to extend)
- User logs out to invalidate session
Multi-Factor Authentication
Optional but highly recommended. Supports:
- TOTP (time-based OTP via authenticator apps)
- SMS codes (optional)
Token Details
- Format: JWT (RS256 signed by VanityPass)
- Claims: user_id, email, memberships, roles
- Expiration: 1 hour
- Refresh: Unlimited until browser logout