Skip to content

feat: refreshing sessions#4

Merged
johnkors merged 3 commits intomainfrom
feat/refresh-token
Dec 9, 2025
Merged

feat: refreshing sessions#4
johnkors merged 3 commits intomainfrom
feat/refresh-token

Conversation

@johnkors
Copy link
Copy Markdown
Member

@johnkors johnkors commented Dec 9, 2025

No description provided.

@johnkors johnkors self-assigned this Dec 9, 2025
@johnkors johnkors requested a review from Copilot December 9, 2025 16:29
@johnkors johnkors added the enhancement New feature or request label Dec 9, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RefreshFloqSession method to handle token refresh via API call to /login/oauth/refresh
  • Updated UserSession record to include RefreshToken parameter
  • Integrated automatic session refresh in both Program.cs and AuthenticationFilter.cs when 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.

Comment thread app/AuthenticationFilter.cs Outdated
Comment thread app/Helpers/Auth/UserSecretsManager.cs
Comment thread app/Helpers/Auth/UserSecretsManager.cs Outdated
Comment thread app/Helpers/Auth/UserSecretsManager.cs
Comment thread app/Helpers/Auth/UserSecretsManager.cs
Comment thread app/Helpers/Auth/UserSecretsManager.cs
Comment thread app/Program.cs Outdated
@johnkors johnkors merged commit 0caaea5 into main Dec 9, 2025
@johnkors johnkors deleted the feat/refresh-token branch December 12, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants