I am using Auth0 to Login with Github - then I wou...
# prisma-whats-new
d
I am using Auth0 to Login with Github - then I would like to retrieve the authenticated users github info before creating the User in the DB. Looking at the docs (https://developer.github.com/v3/#authentication) - it seems pretty straightforward:
curl https://api.github.com/?access_token=OAUTH-TOKEN
The error I am getting:
bad credentials
Am I misinterpreting the Auth token they are asking for?
Copy code
createUser = () => {
    const variables = {
      idToken: window.localStorage.getItem('auth0IdToken'),
      emailAddress: this.state.emailAddress,
      name: this.state.name,
      emailSubscription: this.state.emailSubscription,
    }
    
    fetch(`https://api.github.com/user?access_token=${variables.idToken}`)
    .then(blob => blob.json())
    .then(data => console.log(data))


  }