Skip to content

Session Cookie not setting correctly #626

Description

@jkupchotcg

I'm trying the example with the following cookie store:

store := sessions.NewCookieStore([]byte(os.Getenv("SESSION_SECRET")))
store.MaxAge(86400 * 30)
store.Options.Domain = ""
store.Options.SameSite = http.SameSiteLaxMode
store.Options.Path = "/"
store.Options.HttpOnly = true // HttpOnly should always be enabled
store.Options.Secure = false

gothic.Store = store

I can successfully log in with the provider, but the response shows two Set-Cookie headers for _gothic_session, one that looks correct, the other which is much shorter, but expires in 1970. The one that expires in 1970 appears second, and I believe is not allowing the correct cookie to be stored in the browser.

Has anyone seen something similar to this before?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions