Microsft Owin Facebook authentication is not working in MVC application

北城余情 提交于 2020-01-13 13:13:10

问题


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");

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

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

Can somebody tell me what I am doing wrong?

Thanks in advance.


回答1:


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




回答2:


3.0 uses obsolete APIs, update to 3.1. https://github.com/aspnet/AspNetKatana/issues/38



来源:https://stackoverflow.com/questions/43523602/microsft-owin-facebook-authentication-is-not-working-in-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!