Skip to content

Access OAuth provider specific information #220

Answered by frankie567
davidbrochart asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the scopes, Fief will always by default ask for the scope user and user:email with GitHub. So you should already be covered to call https://api.github.com/user. Apparently, there is no specific permission to enable on the GitHub app settings, apart from "Email addresses" -> "Read-only".


Now, as to how to call the GitHub API. What you show here won't work because you try to use the Fief access token on GitHub, which doesn't recognize it.

However, Fief provides an Admin API so you can generate fresh access tokens from the connected OAuth Provider. You can read more about it here: https://docs.fief.dev/going-further/oauth-provider-token/

So basically:

  1. Using the Admin API, you ask…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@davidbrochart
Comment options

Comment options

You must be logged in to vote
9 replies
@davidbrochart
Comment options

@frankie567
Comment options

@davidbrochart
Comment options

@frankie567
Comment options

@davidbrochart
Comment options

Answer selected by davidbrochart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants