2

I deployed an app to production and i'm getting an error message

Erreur 400 : redirect_uri_mismatch The redirect URI in the request, http://codesnippets.azurewebsites.net/auth/google/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs.

However I added the link to the URI along with the link http://localhost:3000/auth/google/callback. I did the same with the website http://www.mywebsite.com/auth/google/callback but when i try to add it i have a message saying that the app is in production and the URL should be https? enter image description here

Abdo Rabah
  • 1,670
  • 2
  • 15
  • 31

1 Answers1

0

The redirect uri in Google developer console must exactly match the redirect URI your application is calling from.

The easiest way to fix it is to copy the exact url the error message is giving you. If its https you need https if it has a prot you need a port if there is a trailing slash you must include that is as well.

In your case you should add

http://codesnippets.azurewebsites.net/auth/google/callback

This video will walk you though it. Google OAuth2: How the fix redirect_uri_mismatch error.

I was able to add it to a web client with no issues relating to it not being https.

enter image description here

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449