问题
i want to add google oauth to my laravel project using socialite package. i create a project in google developer console with address
http://lvh.me
which is localhost. and for callback url i add this:
http://lvh.me:8000/login/google/callback
and i added the routes and functions to my project and authController. now when i hit the address
http:lvh.me:8000/login/google
it returns for me the error:
Error: redirect_uri_mismatch
The redirect URI in the request, https://lvh.me:8000/login/google/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs
what am i doing wrong?
回答1:
This means that the redirect_uri
you sent in the OAuth request doesn't match the one you have registered in the Google Cloud Console. Check and see whether either of them are wrong. They should be the same.
来源:https://stackoverflow.com/questions/54912724/using-oauth-in-laravel-gives-error-redirect-uri-mismatch