Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements automatic session refresh functionality for expired Floq sessions using OAuth2 refresh tokens. Instead of forcing users to manually re-authenticate when their access token expires, the application now attempts to automatically refresh the session using a stored refresh token.
Key Changes:
- Added
RefreshFloqSessionmethod to handle token refresh via API call to/login/oauth/refresh - Updated
UserSessionrecord to includeRefreshTokenparameter - Integrated automatic session refresh in both
Program.csandAuthenticationFilter.cswhen expired sessions are detected
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| app/Program.cs | Modified to attempt session refresh instead of immediately requiring re-login when session expires |
| app/Helpers/Auth/UserSecretsManager.cs | Added HttpClient for auth operations, implemented RefreshFloqSession method, updated UserSession to include refresh token, and added refresh token validation in GetFloqSession |
| app/AuthenticationFilter.cs | Added session refresh logic before checking session validity in the authentication filter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f443de0 to
f64556e
Compare
f64556e to
32e5102
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.