4

I am running the asp.net identity with MV5 which gives users the option to authenticate with external services such as Google, Facebook and many others. I installed the owin.security.providers so that I can use the Instagram authentication. With other services it's enough to add the following codes in the Startup.Auth:

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

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

app.UseGoogleAuthentication(
            clientId: "***",
            clientSecret: "***");

app.UseYahooAuthentication(
            "***", "***"); 

But that doesn't work with Instagram. Any tips on how to use the Instagram authentication system?

app.UseIntagramAuthentication(//THAT DOESN'T WORK
            "***", "***");   

UPDATE

The correct code for Instagram authentication in the StartUp.Auth.cs is:

app.UseInstagramInAuthentication(
clientId: "YOUR CLIENT ID",
clientSecret: "YOUR CLIENT SECRET");       
Gloria
  • 1,305
  • 5
  • 22
  • 57

1 Answers1

4

Looks like the method is named slightly differently:

UseInstagramInAuthentication

https://github.com/owin-middleware/OwinOAuthProviders/blob/master/Owin.Security.Providers/Instagram/InstagramAuthenticationExtensions.cs

Hao Kung
  • 28,040
  • 6
  • 84
  • 93
  • So it should be UseInstagramInAuthentication instead of UseInstagramAuthentication. Updated my answer above. Now I have another problem, when I click the Instagram button to authenticate I get an error that the page cannot be found. All other services work well. I wonder if the URL to the Instagram page is wrong in the built-in system or I should declare it somewhere....I'll keep on searching for the right code..... – Gloria Sep 04 '14 at 06:37
  • 1
    The link is dead :( – Leonel Sanches da Silva Sep 17 '16 at 21:08