Error: redirect_uri_mismatch (ASP.NET MVC)

I get the following error when trying to sign in with GOOGLE

enter image description here

I tried so many things and nothing works

At first I used the following code

app.UseGoogleAuthentication(clientId: "APIKEY.apps.googleusercontent.com", clientSecret: "SECRET-K"); 

I also tried the following

 app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() { ClientId = "APIKEY.apps.googleusercontent.com", ClientSecret = "SECRET-K", CallbackPath = new PathString("/signin-google") }); 

Bad luck,

My client ID for the web application is configured as follows: enter image description here

I have no idea what I'm doing wrong

Has anyone encountered this problem and found a solution for this

Much appreciated

Greetings

+5
source share
1 answer

The Google Developer Console will remove / at the end of your redirect URI.

The redirect URL must match exactly the location from which you are sending it.

+1
source

Source: https://habr.com/ru/post/1272486/


All Articles