Google OAuth connection in ASP.NET MVC

I've searched a lot on Google these days but couldn't find a suitable solution. In my ASP.NET MVC application, I want to use external logging so that users can log in through their google accounts. First on localhost in the AuthConfig.cs file I used:

OAuthWebSecurity.RegisterGoogleClient();

      

Then, while navigating through the server, I got the error: error

So, I found many links leading to create a project this link and I created it, but I still can't figure out where and how to add credentials. In my AuthConfig.cs file I have this structure:

    public static void RegisterAuth()
    {
        //OAuthWebSecurity.RegisterGoogleClient();
    }

      

and I cannot use the format that starts with (I found this in several places):

    app.UseGoogleAuthentication(
     clientId: "000-000.apps.googleusercontent.com",
     clientSecret: "00000000000");

      

because the app is not part of my file. Can anyone give me directions as to how I should proceed?

+3


source to share


1 answer


The new OWIN / ASP.NET identity looks good. I also tried going through the mentioned DSR, it's pretty easy.

You can take a look at: http://www.asp.net/identity



Who has a link to a good OAuth walkthrough mentioned in the comments but also this one about adding Identity to an existing project : http://www.asp.net/identity/overview/getting-started/adding-aspnet-identity -to-an-empty-or-existing-web-forms-project

0


source







All Articles