Session Cookie not setting correctly
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.6k
- Forks
- 631
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example configuration and inspecting the response's Set-Cookie headers, especially the second cookie that expires in 1970. Done means the login response emits a valid session cookie that the browser stores and uses successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100