I am configuring the login through Google in my application made in Laravel and for this I saw several documentations about it, and all of them were more or less similar.
I tried 3 configurations and in all 3 it was the same error. The page is xx
that it is a free app that I want to launch to the market and I would like people to register with google as well. Has anyone had this error?
My application is in Laravel 5.6, php 7.2, ubuntu 16, google cloud compute. Under Authorized JavaScript Origins: http://localhost , same for Authorized Redirect URIs
Error: redirect_uri_mismatch
The redirect URI in the request, , does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/1018359107925-kft140f29kvhpvffptkfe198qdttmkj0.apps.googleusercontent.com?project=1018359107925
learn more
Request Details client_id=1018359107925-kft140f29kvhpvffptkfe198qdttmkj0.apps.googleusercontent.com redirect_uri= http://tundrainventarios.cl scope=openid profile email response_type=code state=jSAyDaE5FExuJBp8pijXZnC7fjIQrDBh0oeK38mg That's all we know.
The error means that you have not authorized your Google credentials to accept authentication requests from the url http://tundrainventarios.cl . In this case, what you have to do is enter your project in the developer console by going to the link https://console.cloud.google.com/apis/credentials and making sure you are in the correct project. Then you have to go to the credentials section and update the values of the clientId that you are using. Take the image below as an example:
You are not sending the authorization URI address, it has to be an address of your project, in the image is an example of how to redirect it
(Additional) In this article I show you how you can configure the project:
https://diegochavez-dc.medium.com/como-crear-credenciales-de-autorizaci%C3%B3n-de-clientes-oauth-para-enlazar-nuestra-app-con-informaci%C3%B3n-53397559c501