Skip to content

Commit

Permalink
fix: admit longer session cookies by using a larger store (#4600)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Adler <[email protected]>
  • Loading branch information
kedorlaomer and Alexander Adler authored Nov 8, 2024
1 parent b55eedd commit 192fddf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/src/api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import (
"fmt"
"math"
"net/http"
"os"
"strings"
"time"

"scrumlr.io/server/common"
"scrumlr.io/server/logger"

"github.com/go-chi/render"
"github.com/gorilla/sessions"
"github.com/markbates/goth/gothic"
"scrumlr.io/server/common/dto"
"scrumlr.io/server/database/types"
Expand Down Expand Up @@ -72,6 +74,9 @@ func (s *Server) logout(w http.ResponseWriter, r *http.Request) {

// beginAuthProviderVerification will redirect the user to the specified auth provider consent page
func (s *Server) beginAuthProviderVerification(w http.ResponseWriter, r *http.Request) {
store := sessions.NewFilesystemStore(os.TempDir(), []byte("scrumlr.io"))
store.MaxLength(0x8000)
gothic.Store = store
gothic.BeginAuthHandler(w, r)
}

Expand Down

0 comments on commit 192fddf

Please sign in to comment.