0

I have created asp.net mvc5 web project, I have enabled Google Authtication by un-commenting the following inside the Startup.Auth.CS:-

app.UseGoogleAuthentication();

now I have create a project on the following environment:-

  • Visual studio 2012 professional.

  • Asp.net mvc5 web application.

  • Running on windows server 2008 R2.

And the Google authentication works well on my test project runs locally http://localhost:53357.

Yesterday I wanted to test the new Visual Studio 2013, so I download Visual Studio 2013 express on my windows 7 machine,, and I created a new asp.net mvc5 web project. But when I try to test the Google authentication I got the following error on google page:-

> 400. That’s an error.
> 
>  
> 
> OpenID auth request contains an unregistered domain:
> http://localhost:53682
> 
>  
> 
> Learn more
> 
> That’s all we know.

So why google authentication works well on certain projects and fail to work on other?

Please adivce

John John
  • 1
  • 72
  • 238
  • 501

2 Answers2

0

Google has stopped registering new domains from may 2014 onwards. This applies to all those using OPEN ID. https://developers.google.com/accounts/docs/OpenID2

Nikhil
  • 41
  • 4
0

The solution to this problem is to use Google Plus which is doable within the current OAuth classes provided by Asp.Net MVC as outlined in this article.

I followed his instructions and it is working fine.

EDIT: I will point out that the link in his article to set up the Google end of things takes you one level too deep. When you hit the Google Developers Console, click on Projects in the upper left of the screen to go back up a level and create your project first before proceeding. You will need to complete the Consent screen and Credentials screen to get it to work.

Perry
  • 611
  • 6
  • 15