markbates / markbates/goth

discord provider requires "identify" scope

Open
#414 1 comment 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

This might be a fairly naive problem on my behalf, this is fairly new to me.

I have successfully used the google provider with just the "email" scope.

When I try the same with discord, when the callback is called I get an error:

discord responded with a 401 trying to fetch user information

I suspect the returned body of the request made in FetchUser has something interesting, but I'm not familiar enough with net/http yet to work out how to inject my own client which can expose that.

If I add the "identify" scope, things work correctly.

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 Discord provider's FetchUser path and reproduce the callback with only the email scope, then compare it with the working identify-scope case. Inspect the HTTP response involved in the 401 and determine whether the provider behavior or its scope requirements need to be clarified; verify the result through the callback flow.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.