I've some issues with a ASP.Net API and Google Authentication. I work with VS 2017 and .net FW 4.6.1.

In this app the login can be made by create a new app user or use a Social network authentication like Google Account. So I create a Google Project with a Credentials for Web Application and refer my dev env web site and my prod public web site.

In dev mode with Localhost it works perfectly but with my public domain name I get a


The /signin-google?state=.... request, after choosing a google account, take 1 min and redirect to the home page with the access_denied error.

  • Do I need to regenerate the call to /api/account/externallogin with the publish website ? (I've already change the redirectURI)
  • Is the Google Project Name important to access to the API ?
  • Must the client ID be different between Dev and Prod ?

I've followed this tutorial to implement the authentication in my web site for more details : http://csharp-video-tutorials.blogspot.com/2016/12/aspnet-web-api-google-authentication.html?_sm_au_=iVVDF8LpPKL6W0sQ


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.