How to migrate MVC 4 OpenId Sign in to Google to sign in to OAuth 2.0 or Google+

I have an MVC 4 web application that is currently using ready-made login to Google OpenId. This was deprecated by Google, so I need to port this to one of the methods supported by Google. I read the documentation provided by Google, OpenID 2.0 (Migration) , but I still cannot integrate the new login method with my application.
All I intend to use to sign in to Google is an email address. I am not interested in receiving any other information from Google about the user.

My question is: what steps should I take to migrate my MVC 4 web application to a supported Google login method?

Note. When formatting this question, I came across this promising information: Web Applications (ASP.NET MVC)

+7
asp.net-mvc-4 google-plus google-oauth google-openid
source share
1 answer

All you have to do is create an MVC project in C #, enable Single Authorization, and edit the Startup.Auth.cs file with the information:

app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() { ClientId = "{your ID}", ClientSecret = "{your client-secret}" }); 
+1
source share

All Articles