anand-harsh / Edumi

Edumi, Place to learn and grow skills with proper maintenance
https://edumi.vercel.app/
9 stars 28 forks source link

[Feature]: Implement Automatic Sign-in Using Refresh Token #123

Closed JavidSumra closed 9 months ago

JavidSumra commented 9 months ago

Guidelines

Description

To improve user experience and streamline the authentication process, we aim to implement automatic sign-in functionality using refresh tokens. When a user clicks the login button, the application will automatically attempt to sign them in using their refresh token, ensuring seamless access to protected resources without the need for manual reauthentication.

Problem

Now Users need to Provide their Credentials for Login by Implementing this There is no need to Provide Credentials if User has Valid Refresh Token

Proposed Solution

Proposed Solution:

  1. Modify Login Button Behavior:

    • Update the behavior of the login button to trigger automatic sign-in using the user's refresh token upon click, instead of navigating to the traditional login page.
    • Ensure that this behavior is clearly communicated to users to avoid confusion about the login process.
  2. Refresh Token Handling:

    • Implement logic to securely retrieve the user's refresh token from storage upon clicking the login button.
    • Use the refresh token to request a new access token from the authentication server, effectively signing the user in without requiring them to enter their credentials.

By implementing automatic sign-in using refresh tokens, we aim to streamline the authentication process and provide users with a seamless login experience while maintaining security and reliability.

Alternatives Considered

There is no Alternative

JavidSumra commented 9 months ago

Hey @anand-harsh Sir I would Like to Work on this issue Under JWOC 2024