Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/auth/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions internal/auth/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down