aethel icon indicating copy to clipboard operation
aethel copied to clipboard

[TASK 2.10] JWT Token Generation and Verification Utilities

Open aditsuru opened this issue 1 year ago • 1 comments

📋 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.

aditsuru avatar Oct 17 '25 14:10 aditsuru

Can you assign this to me?

Silversoul-07 avatar Oct 17 '25 14:10 Silversoul-07