sayan404 / TaskPulse

an application that helps people to register and track there work
https://taskpulse.onrender.com
MIT License
7 stars 11 forks source link

Feature Request: refreshToken in JWT Authentication #40

Closed JavidSumra closed 7 months ago

JavidSumra commented 7 months ago

Description: Currently, our application relies on JSON Web Tokens (JWT) for authentication. However, we've encountered limitations with the expiration of JWT tokens. To address this, we propose implementing a refreshToken mechanism alongside JWT authentication.

Benefit:

  1. Enhanced Security: Refresh tokens provide an additional layer of security by allowing short-lived JWT tokens to be refreshed without requiring users to log in again.
  2. Improved User Experience: With refreshToken support, users won't be abruptly logged out due to expired JWT tokens, enhancing their overall experience.
  3. Scalability: Implementing refreshToken can facilitate scalability by reducing the need for frequent re-authentication requests, especially in high-traffic scenarios.

Proposed Solution: Introduce a refreshToken endpoint that, upon receiving a valid refresh token, issues a new JWT token without requiring users to provide their credentials again. This endpoint should handle token expiration, invalidation, and rotation securely.

Additional Considerations:

Implementation Details:

  1. Backend Changes: Describe the necessary changes to the backend infrastructure, including modifications to the authentication service and database schema.
  2. API Endpoints: Specify the endpoints required for refreshToken functionality, along with their expected behavior and input/output formats.
JavidSumra commented 7 months ago

Hey @sayan404 Sir I Would Like to Work on this Issue Under JWOC 2024

sayan404 commented 7 months ago

assigned @JavidSumra