Auth token flow
Signup, login, and access a protected dashboard.
Protected
Dashboard
Uses your token to call /api/profile. If no token, it redirects to login.
Token expiry
1 day
Password
bcrypt hash
Auth state
Context
API
Endpoints
- POST /api/auth/signup
- POST /api/auth/login
- GET /api/profile
Session
Stay logged in
Token is loaded on refresh and profile is fetched automatically.