aethel
aethel copied to clipboard
[TASK 2.10] JWT Token Generation and Verification Utilities
📋 Task Description
Create utility functions to generate and verify JWT access and refresh tokens.
🎯 Deliverables
Files to create/modify:
src/utils/jwt.ts
📚 Reference Documentation
Refer to 01-Authentication-and-Users.md - JWT Strategy section
✅ Acceptance Criteria
- [ ] Function to generate access token with configurable expiry
- [ ] Function to generate refresh token with configurable expiry
- [ ] Function to verify and decode JWT tokens
- [ ] Uses environment variables for secrets and expiry
- [ ] Token payload contains only userId
⚠️ Important Guidelines
- Read CONTRIBUTING.md before starting
- PR must address only this issue - multi-issue PRs will be rejected
- Implement only what is specified - do not make assumptions or add extra features
- Follow the exact patterns and structure defined in the reference documentation
💬 Questions?
Ask in the Discord server or comment below before starting work.
Can you assign this to me?