✅ Blazor Serverside Google Authentication Error 400

Hi folks,

I'm trying to add Google sign in to a Blazor Serverside application, but I am consistently getting error 400: redirect_uri_mismatch.

As seen in the the first screenshot, this is my API endpoint in my controller for the Google sign in, with the (temporarily) hard coded RedirectUri, since I want to go to the "/" page after a successful login.

As you can see in the second screenshot, I get this error when I navigate to the google sign in page.

Going to the developer console and looking at authorised redirect URIs (see screenshot), as prompted by the error, shows that it matches the redirect URI from my controller.

So far, I have tried:
  • Remaking the entire Blazor project from scratch
  • Making an entirely new Google account and a brand new API on the Google Cloud Console.
There is no mention of "signin-google" anywhere in the code for my project, nor in the Google cloud project.

I'm completely lost here and my boss wants this prototype up and running ASAP, so any of your ideas are massively appreciated.

Thanks in advance.
Screenshot_2023-04-21_at_13.22.10.png
Screenshot_2023-04-21_at_13.23.54.png
Screenshot_2023-04-21_at_13.25.20.png
Was this page helpful?