'React-app Google OAuth2 .0 Error 400: redirect_uri_mismatch

Google OAuth2 Error 400

I have initially set Authorized URI in Google Developer Console as "http://localhost:3000/" but it gives error as above.

I tried by replacing it with "http://localhost:3000/login/google/return" as error image, but by doing it instead of logging in successfully it redirects to same login page again.

Plz help me.



Solution 1:[1]

Go to google cloud platform next to your OAuth 2.0 client and add http://localhost into JS source

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bartosz Dmitruk