Bad credentials for GitHub GraphQL authentication

Hi there.

I’m working in a React SPA connected to GitHub GraphQL API. I was working in my local until couple of days go, so I just generated an OAuth token for testing and coding in my environment. Now that I got the app finished, I’m trying to add proper authorization mechanism with auth0 to grant access to each GitHub user, but I can’t get it working properly.

I’ve followed these tutorials:

The whole process seems fine:

  1. My SPA requests proper auth access to GitHub with necessary scope mentioned on their docs
  2. The auth flow is completed successfully
  3. I call GitHub GraphQL API with the access token I got but it always says “bad credentials”

As I said, the GitHub GraphQL API connection works fine when I generate the OAuth token from my settings, so the connection to their API is fine. I followed all necessary steps for connecting to GitHub login, I don’t know if I’m missing something… Could anyone help me with this? Thanks!

1 Like

Came here to find a solution to this exact issue. Even if I consent to every available github scope, no matter what I do github rejects the token.

1 Like

same issue here, using oauth app in github and using auth0 to integrate with it, getting bad credentials 401 on the token when trying to access github rest api v3

Created a new Secret and updated my auth0 integration with the new secret, now everything is working, i guess it was a token that somehow wasn’t parsed correctly in the integration process with auth0. thank you