How to login to the site using Instagram, Twitter or Google+ account on Platform . NET (C#)

Asked

Viewed 658 times

8

I’m looking to develop something of the kind but I have no references to how to do, could help me with some example?

  • Although it does not seem, the question is great. You will have my vote to reopen if it is closed.

  • Hello Gabriel. SOPT is not a forum, but a site of questions and objective answers. Your question is very broad, because explanations on how to develop a login system (even more in several different technologies) would give many answers or very long answers. You could edit the question to make it more specific, mainly by offering part of what you have already tried to do. Also read, please, sections [help] and [Ask].

  • 3

    @Luizvieira I disagree. For the specific case of . NET, the methodology is well defined and it is not something that broad. This is one of those questions that are part of the gray area of specific knowledge of area. There is no problem with it. See answer I put, whose creation script is well known.

  • 1

    @Ciganomorrisonmendez Hum... you’re right. I only saw your comment after (I voted to close by the analysis queue). Sorry, I will vote to reopen (and thanks for the warning).

1 answer

9


Start with an example ASP.NET Identity system. In this answer I teach step by step.

Two automatic files should be created in the process:

  • Startup.cs (root directory);
  • App_Start/Startup.Auth.cs.

Startup.cs flame Startup.Auth.cs. Notice that Startup.Auth.cs shall have the following lines::

        // Uncomment the following lines to enable logging in with third party login providers
        //app.UseMicrosoftAccountAuthentication(
        //    clientId: "",
        //    clientSecret: "");

        //app.UseTwitterAuthentication(
        //   consumerKey: "",
        //   consumerSecret: "");

        //app.UseFacebookAuthentication(
        //   appId: "",
        //   appSecret: "");

        //app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
        //{
        //    ClientId = "",
        //    ClientSecret = ""
        //});

This is where the integration providers with the most established Internet services are set up.

In addition, a Partial (Views/Account/_ExternalLoginsListPartial.cshtml) which creates buttons for integration with providers configured in Startup.Auth.cs.

For the case of Instagram, there is still the excellent package Auth0 that simplifies the whole process for you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.