markbates / markbates/goth

Updating dependencies breaks login: securecookie: hash key is not set

Open
#549 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
6.6k
Forks
631
PR merge metrics
No merged PRs in 30d

Description

Not sure why you need the gorilla/sessions package but updating the intenal depemdencies to the latest version breaks gothic login:

```
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.2.2 // indirect
```

Upgrading to:

```
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.2.1 // indirect
```

Causes the login to fail with the message displayed on the screen

```
securecookie: hash key is not set
```

In addition the following message is displayed:

```
goth/gothic: no SESSION_SECRET environment variable is set. The default cookie store is not available and any calls will fail. Ignore this warning if you are using a different store.
```

Note! I do not use the default cookie store, so I ignore this message.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the gothic login failure with the listed gorilla/securecookie and gorilla/sessions versions, then inspect the gothic login path and SESSION_SECRET/default cookie-store handling. Done means identifying the dependency-related cause and restoring successful login when a custom store is used, without relying on the default cookie store.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.