markbates / markbates/goth

feat: support overriding the gothic.SessionName value

Open
#470 0 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

As it stands currently, the goth package forces cookies under a specific name. This is fine when working with one http service and/or routing handler, however if one is developing multiple http services locally, or registering multiple independent goth configurations, the inability to override this value means that each configuration will overwrite eachother. I suspect simply changing this from a const to a var will be backwards compatible (though not the most ideal, global package variables).

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 at the goth.SessionName declaration and trace where the package uses it for cookies. Check whether making this value configurable preserves the existing default and prevents independent configurations from overwriting each other; done means callers can override the name without breaking current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.