diff --git a/internal/auth/github.go b/internal/auth/github.go index 9f092f12..e788c3dc 100644 --- a/internal/auth/github.go +++ b/internal/auth/github.go @@ -65,7 +65,7 @@ func (h *GitHubHandler) HandleCallback(ctx *gin.Context) { } // Store user session - session, err := gothic.Store.New(ctx.Request, h.sessionSecret) + session, err := gothic.Store.New(ctx.Request, "trakrlog-session") if err != nil { ctx.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{ "success": false, diff --git a/internal/auth/google.go b/internal/auth/google.go index a51aea0c..e790724b 100644 --- a/internal/auth/google.go +++ b/internal/auth/google.go @@ -65,7 +65,7 @@ func (h *GoogleHandler) HandleCallback(ctx *gin.Context) { } // Store user session - session, err := gothic.Store.New(ctx.Request, h.sessionSecret) + session, err := gothic.Store.New(ctx.Request, "trakrlog-session") if err != nil { ctx.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{ "success": false, @@ -92,7 +92,7 @@ func (h *GoogleHandler) HandleCallback(ctx *gin.Context) { func (h *GoogleHandler) GetAuthUser(ctx *gin.Context) { // Retrieve the session - session, err := gothic.Store.Get(ctx.Request, h.sessionSecret) + session, err := gothic.Store.Get(ctx.Request, "trakrlog-session") if err != nil { ctx.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{ "success": false, diff --git a/internal/middleware/auth.go b/internal/middleware/auth.go index caa1236e..8a78ac0f 100644 --- a/internal/middleware/auth.go +++ b/internal/middleware/auth.go @@ -13,7 +13,7 @@ import ( func RequireAuth(sessionSecret string) gin.HandlerFunc { return func(ctx *gin.Context) { // Retrieve the session - session, err := gothic.Store.Get(ctx.Request, sessionSecret) + session, err := gothic.Store.Get(ctx.Request, "trakrlog-session") if err != nil { ctx.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{ "success": false,