react-github-login
react-github-login copied to clipboard
'code' not found
Error: 'code' not found
at t.r.onSuccess (GitHubLogin.js?ff85:1)
at eval (GitHubLogin.js?ff85:1)
at
You should try setting redirectUri to an empty string :
<GitHubLogin
clientId=""
redirectUri=""
onSuccess={console.log}
onFailure={console.log}
/>
@joshuadiezmo Can you provide a code sample of how you're instantiating the component? Thanks for the report!
Just to let you know, the solution @polc gave worked. When you leave redirectUri out of the parameters, then you get that error message.
Yeah I've got the code error: 99be1a4d4e66752d96e6.
Oh man! u nailed it!.. thanks alot.. this error is bugging me the whole day.. thanks alot
I have the following code:
<GithubLogin
clientId='1759a45458ed00e'
redirectUri=''
onSuccess={this.handleSuccess}
onFailure={(err) => console.log('Error Logging in: ', err)}
/>
and still getting the above error!
You have to put the same URL that it's configured in the OAuth callback field on your GitHub App
<GitHubLogin
clientId=""
redirectUri="http://localhost:3000/login"
onSuccess={console.log}
onFailure={console.log}
/>
GitHub App
Authorization callback URL
http://localhost:3000/login
<GitHubLogin clientId="Github Client ID" redirectUri="" onSuccess={ responseGithub } onFailure={ responseGithub } />