Mayank2808sharma / IRCTC-backend

25 stars 28 forks source link

Implement Refresh Token and Access Token Logic over simple token #52

Open arin-paliwal opened 4 months ago

arin-paliwal commented 4 months ago

Background

Currently, the authentication mechanism in the project relies solely on JWT tokens. While this approach is functional, it can be enhanced for better security and user experience by introducing refresh tokens alongside access tokens.

Current Approach

Proposed Enhancement

Implement a dual-token authentication system using Access Tokens and Refresh Tokens.

Proposal

Access Tokens

Refresh Tokens

Benefits

  1. Enhanced Security: Even if an access token is compromised, it has a short lifespan, reducing the window of vulnerability.
  2. Improved User Experience: Users remain logged in for longer periods without frequent interruptions for re-authentication.
  3. Granular Control: Allows better control over session management and invalidation.

Please assign this issue to me. I am eager to contribute to this project and would like to implement this enhancement.

github-actions[bot] commented 4 months ago

Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible.