2014-09-02 53 views
4

我正在运行MV5的asp.net身份,它使用户可以选择使用外部服务(如Google,Facebook等)进行身份验证。我安装了owin.security.providers,以便我可以使用Instagram身份验证。有了其他服务,就足以在Startup.Auth中添加以下代码:与Instagram的asp.net身份认证

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

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

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

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

但是这不适用于Instagram。有关如何使用Instagram认证系统的任何提示?

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

UPDATE

对于Instagram的认证在StartUp.Auth.cs正确的代码是:

app.UseInstagramInAuthentication(
clientId: "YOUR CLIENT ID", 
clientSecret: "YOUR CLIENT SECRET");  
+0

您应该将浩昊的答案标记为正确的答案;)请随时发布有关您遇到的网址问题的新问题。 – 2014-09-04 10:07:46

回答

3
+0

所以它应该是UseInstagramInAuthentication而不是UseInstagramAuthentication。上面更新了我的答案。现在我遇到了另一个问题,当我单击Instagram按钮进行身份验证时,出现无法找到页面的错误。所有其他服务运作良好。我不知道是否内置系统的Instagram页面的URL是错误的,或者我应该将它声明在某个地方....我会继续寻找正确的代码..... – Gloria 2014-09-04 06:37:33

+0

链接已经死了:( – 2016-09-17 21:08:36