Overview
The Authentication API handles user login, registration, token refresh, and session management. Base Path:/auth
Endpoints
Login
Register
Refresh Token
Logout
Get Current User
Token Structure
JWT Payload
Error Codes
| Code | Error | Description |
|---|---|---|
| 400 | invalid_credentials | Email or password incorrect |
| 400 | email_already_exists | Email already registered |
| 401 | token_expired | JWT token has expired |
| 401 | invalid_token | JWT token is malformed or invalid |
| 422 | validation_error | Request body validation failed |
Frontend Integration
Next Steps
Authentication Flow
Complete auth architecture
Backend Auth
JWT middleware implementation
Security Guide
Security best practices
