Skip to content

[feat] Enhance authentication flow with refresh token support and improved session expiration handling #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 10, 2025

Conversation

Aloento
Copy link
Member

@Aloento Aloento commented Apr 9, 2025

Summary of the Pull Request:

This pull request introduces several improvements to the user authentication flow, particularly around session expiration and refresh token support:

  • Improved Login Expiration Handling
    The system now directly checks for user expiration status rather than relying on arbitrary timeouts. This change enables immediate feedback to the user when their session has expired.

  • Removal of Unnecessary Timeout Logic
    Simplifies the session handling logic by eliminating redundant timeout code, leading to cleaner implementation and better user experience.

  • Enhanced Toast Notifications
    Toast messages for expired sessions have been upgraded to include a streamlined dismissal mechanism, improving user interaction.

  • Refresh Token Support
    Introduces a refresh token mechanism to automatically extend user sessions without requiring manual re-authentication. A silent sign-in strategy is implemented to renew tokens seamlessly in the background.

  • Improved Error Handling & Logging
    Enhances logging around authentication errors and ensures silent sign-in attempts are prioritized before user-facing errors are displayed.

Aloento added 4 commits April 10, 2025 00:24
Updates the logic to check for user expiration status directly instead of relying on a timeout.

Removes unnecessary timeout and improves user experience by immediately notifying users when their login has expired.

Enhances the toast notification with a streamlined dismissal option.
Implements handling of refresh tokens to enhance user session management.

Updates error handling to ensure both access and refresh tokens are validated.

Includes a new silent sign-in method to refresh user tokens automatically.
Refactors session expiration handling to provide a toast notification for expired logins.

Enhances error logging for authentication issues and ensures silent sign-in attempts are made before dispatching the notification.
@Aloento Aloento self-assigned this Apr 9, 2025
@Aloento Aloento linked an issue Apr 9, 2025 that may be closed by this pull request
@Aloento Aloento added the gate Merge PR label Apr 10, 2025
@otc-zuul otc-zuul bot merged commit 8275662 into main Apr 10, 2025
7 checks passed
@otc-zuul otc-zuul bot deleted the feat branch April 10, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature to refresh the access token
2 participants