markbates / markbates/goth

logout provider

Open
#604 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

The logout handler in the example has a path param provider, but its purpose isn't obvious.
https://github.com/markbates/goth/blob/4b34e1719daae56def96b42ec23ca05badf6ca24/examples/main.go#L244-L248
It only calls gothic.Logout(res, req):
https://github.com/markbates/goth/blob/4b34e1719daae56def96b42ec23ca05badf6ca24/gothic/gothic.go#L239-L252
As Logout only clears the session, I assume it's used to invalidate the session if the user breaks the auth flow prematurely. At this point it isn't really a logout but rather a reset. I don't see a reason to scope /logout to a provider, if anything, it makes logging out more difficult because we have to track the provider (e.g. session cookie).

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

Read the logout handler in examples/main.go and the Logout implementation in gothic/gothic.go. Trace how the provider path parameter is used through the example's auth flow, then decide whether the route should be provider-independent. Done means the logout behavior and route no longer require tracking a provider while still clearing the session.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.