3

I created an oAuth key for my laravel site for google login. I successfully implemented this in local. But when I migrated my site to live I got this error:

400. That’s an error.

Error: redirect_uri_mismatch
Request Details

    client_id=xxxxxxx-0fic8dnvcgo672unju9ai619iXXXXXX.apps.googleusercontent.com
    redirect_uri=https://laravel.themenepal.com/gharsansar/auth/google/callback
    scope=openid profile email
    response_type=code
    state=NRu0eU9UdwEXYSV0dixOc0BjuH3bluFkHiBDJFgO

That’s all we know.

I think this is primarily due to redirect url being mismatched with what is set in Google console. I've changed the redirect urls in .env. I have searchd a lot to be able to update the redirect uri in google console but nothing helped.

If you know that would be a great help.

UPDATE: The screenshot of the url edit page is as follows: enter image description here

P S
  • 435
  • 1
  • 8
  • 26

2 Answers2

2

If you goto: https://console.developers.google.com/apis/credentials and select the correct project, then the correct the correct OAuth 2.0 client IDs and edit the correct OAuth 2.0 client IDs.

jwilleke
  • 10,467
  • 1
  • 30
  • 51
  • Hello sir, I have already tried that , but there's no option to edit redirect urls, It allows to change the name only. Is there any google policy not to allow changes after certain time? – P S May 13 '18 at 07:48
  • You should see a page similar to: https://i.stack.imgur.com/QRZEC.png Where you can delete or add links. If not, then you must not have appropriate permissions to make changes. Perhaps you could show a screenshot. – jwilleke May 13 '18 at 07:59
  • Hello sir, please have a look .https://www.awesomescreenshot.com/showImage?img_id=3351856 – P S May 13 '18 at 08:31
  • The link is not accessible to me. – jwilleke May 13 '18 at 19:44
  • Okay I'll add that image in my question. – P S May 14 '18 at 05:57
2

There appears to be no option to edit it if it's created as an OAuth 2.0 client ID of type "Other." If you choose Web Application, you can edit them yourself.

beachCode
  • 3,202
  • 8
  • 36
  • 69