Microsft Owin Facebook身份验证在MVC应用程序中不起作用 [英] Microsft Owin Facebook authentication is not working in MVC application

查看:72
本文介绍了Microsft Owin Facebook身份验证在MVC应用程序中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Asp.Net MVC应用程序.我正在使用默认的Visual Studio项目模板. Google身份验证工作正常,但Facebook无效.我指定了在我的Facebook开发人员门户上生成的有效appId和appSecred,并且该应用程序可供公众使用.

I am working in Asp.Net MVC appplication. I am using the default visual studio project template. Google authentication is working fine but facebook doesn't. I specified a valid appId and appSecred generated on my facebook developer portal and the app is available to the public.

app.UseFacebookAuthentication(
       appId: "111111111111",
       appSecret: "aaaaaaaaa");

用户尝试使用Facebook登录后,系统将重定向到 https://localhost: 44301/帐户/登录号 =

After the user tries to login with facebook, the system redirects to https://localhost:44301/Account/Login#=

它没有输入/Account/ExternalLoginCallback,所以我认为登录失败.

It is not entering to /Account/ExternalLoginCallback, so I assume the login failed.

有人可以告诉我我在做什么错吗?

Can somebody tell me what I am doing wrong?

提前谢谢.

推荐答案

转到NuGet软件包管理器并运行此命令Install-Package Microsoft.Owin.Security.Facebook并尝试登录.

Go to NuGet Package Manager and run this command Install-Package Microsoft.Owin.Security.Facebook and try doing the log in.

这篇关于Microsft Owin Facebook身份验证在MVC应用程序中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆