CakeDC/users

Never success login to google. Error 400: redirect_uri_mismatch.

wawanabnan opened this issue · 7 comments

I would like to make social login using google oAuth and follow the instruction in https://github.com/CakeDC/users/blob/master/Docs/Home.md. But never success with below error:

Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.

If you're the app developer, register the redirect URI in the Google Cloud Console.

redirect_uri: http://localhost:2500/auth/google

can anybody tell me how this plugin running wel with google oAuth? Is there any examples?

thank

@wawanabnan You need to go to Google Cloud Console and add the url http://localhost:2500/auth/google as Authorized redirect URIs

https://console.cloud.google.com/apis/credentials -> Click at OAuth 2.0 Client ID -> Add Authorized redirect URI

of course the "redirect_uri_mismatch" occurs even though I have added http://localhost:2500/auth/google in my credential's uri. Is there any setting needed?

@wawanabnan

I just created a new project and oauth2 credential at google console and tested with https://github.com/CakeDC/users-example . It worked for me.

Are you sure that your browser is using http and not https ?

Sure I use http not https. I use local server usign laragon. But I also have tested on my hosting using https but get some error. I am testing your https://github.com/CakeDC/users-example.

Thank for your response.

You are right. Both of them working well including facebook. Sorry I use d the wrong Google ClientID (typo mistake).
thank a lot for your great project.

case close

Happy to know that it worked.