-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Feature Request
Implement JWT authentication with Refresh Token rotation.
Why
Currently, tokens expire without refresh, forcing users to log in again.
Adding refresh tokens will:
Improve user experience (silent refresh).
Increase security with token rotation.
Allow logout to invalidate refresh tokens.
Tasks
Update User model to store refresh tokens.
Add refresh token generation (with rotation).
Add refresh-token` endpoint.
Update login to return both access + refresh tokens.
Add logout endpoint to invalidate refresh tokens.
Security
Short-lived access tokens (15 min).
Long-lived refresh tokens (7 days).
Rotation to prevent replay attacks.
Refresh tokens stored in DB.
Reactions are currently unavailable