Skip to content

fix: Update session handling to use a consistent session name#23

Merged
dev-bre merged 1 commit intomainfrom
fix-session
Dec 3, 2025
Merged

fix: Update session handling to use a consistent session name#23
dev-bre merged 1 commit intomainfrom
fix-session

Conversation

@dev-bre
Copy link
Contributor

@dev-bre dev-bre commented Dec 3, 2025

This pull request standardizes the session name used across authentication handlers and middleware by replacing the use of a configurable sessionSecret with the hardcoded string "trakrlog-session". This ensures consistent session management and simplifies session retrieval throughout the codebase.

Authentication session handling:

  • Updated the session creation in GitHubHandler.HandleCallback to use "trakrlog-session" instead of the variable h.sessionSecret.
  • Updated the session creation and retrieval in GoogleHandler.HandleCallback and GoogleHandler.GetAuthUser to use "trakrlog-session" instead of h.sessionSecret. [1] [2]

Middleware session retrieval:

  • Modified the RequireAuth middleware in auth.go to use "trakrlog-session" for session retrieval instead of the passed sessionSecret parameter.…GitHub and Google handlers

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Related Issue

Closes #(issue number)

How Has This Been Tested?

Describe the tests you ran and how to reproduce them.

Screenshots (if applicable)

Add screenshots to help explain your changes.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@dev-bre dev-bre merged commit bd7f20c into main Dec 3, 2025
2 checks passed
@dev-bre dev-bre deleted the fix-session branch December 3, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant