Authentication¶
Convergio AI uses JWT (JSON Web Tokens) with database-backed sessions for authentication.
Endpoints¶
Register¶
Create a new user account.
Login¶
Authenticate with email and password. Returns a JWT and refresh token.
Refresh token¶
Exchange a refresh token for a new access token.
Logout¶
Destroy the current session. Requires JWT.
Get current user¶
Returns the authenticated user's profile. Requires JWT.
Using the token¶
Include the JWT in the Authorization header:
Security model¶
- JWT + database session double-check (valid JWT AND active session)
- Session revocation is instant (delete session record)
- Refresh tokens for seamless token renewal
- Password hashing with bcrypt (cost factor 10)
- Optional 2FA via TOTP with backup codes