Is redirectUri working as intended?
See original GitHub issueI am loading the component as follows:
<GoogleLogin
clientId="<client_id"
buttonText={text}
scope={scope}
onSuccess={this.responseGoogle}
onFailure={this.responseGoogle}
cookiePolicy={'single_host_origin'}
disabled={disabled}
responseType={'code'}
accessType={'offline'}
uxMode={'redirect'}
redirectUri={'https://localhost:5000/google_oauth_redirect'}
/>
I have tried a host of different redirectUri’s in their but both 1) none of them seem to be passed to the popup* and 2) I keep getting an error via the python server that is using the returned code that the redirect_uri is a mismatch.
- Why is this a popup and not a redirect? Am I doing something wrong there as well?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
how to fix redirect uri not valid? - Microsoft Q&A
I've managed to log in by signing out of chrome and using an incognito tab. It still doesnt work when im signed in...
Read more >Redirect uri not working - Stack Overflow
I'm trying to implement the oauth google authentication in symfony2 with hwi oauth bundle. I added the button and the popup open and...
Read more >What is the purpose of OAuth 2.0 redirect_uri checking?
Authentication is about intention, tricking a user into allowing access to an unintended resource is a vulnerability.
Read more >Redirect Users - Auth0
To learn more about how the redirect_uri works, see OAuth 2.0 ... URL to redirect the user back to their intended page after...
Read more >Invalid redirect uri for "Valid Redirect URIs with https://*"
What is the full URL of that 'keycloak sso page'. There is requested redirect url parameter and that one can be really http,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We figured it out. On the server, you must set the redirect_uri=“postmessage” . This does break codes from mobile clients, so we needed to make it dynamic by client, but for this library, and our params, this fixes it and we’re able successfully validate codes.
More info here: https://stackoverflow.com/questions/11485271/google-oauth-2-authorization-error-redirect-uri-mismatch
I am having the same problem and will need some help. Since ‘react-google-login’ seems to be quite mature this probably is a reconfiguration. I also get redirect_uri_mismatch back from my backend.
I use the component like so:
For my local dev I use redirectUri={‘http://localhost:8000/’}, both this and the correct origin are added to the https://console.cloud.google.com/apis/credentials console.
I do not see the redirect_uri argument in the outgoing request. The request is:
https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AXXXXXXXX&client_id=XXX.apps.googleusercontent.com&origin=http%3A%2F%2Flocalhost%3A8000&scope=openid%20profile%20email&ss_domain=http%3A%2F%2Flocalhost%3A8000
The code is received OK. The corresponding request from my backend is:
Version 5.1.10