[英]Facebook OAuth: Callback URI gives me an HTTP ERROR 500
So I am pretty much using the default MVC-template that includes OAuth authentication with facebook. 因此,我几乎使用了默认的MVC模板,该模板包括与Facebook进行OAuth身份验证。 But after authenticating I am getting an
HTTP ERROR 500
. 但是,经过身份验证后,我收到了
HTTP ERROR 500
。
I am using OAuth Version 4.0. 我正在使用OAuth 4.0版。 My ConfigureAuth looks like this:
我的ConfigureAuth看起来像这样:
public void ConfigureAuth(IAppBuilder app)
{
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
// Local Login Cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/ExternalLogin"),
ExpireTimeSpan = TimeSpan.FromDays(3),
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Facebook
var facebookOptions = new FacebookAuthenticationOptions
{
AppId = "[MY APP ID]",
AppSecret = "[MY APP SECRET]",
CallbackPath = new PathString("/Account/ExternalLoginCallback"),
};
app.UseFacebookAuthentication(facebookOptions);
}
In my facebook app I have added https://localhost:44365/Account/ExternalLoginCallback
to my valid OAuth Redirect URIs. 在我的Facebook应用程序中,我已将
https://localhost:44365/Account/ExternalLoginCallback
到我的有效OAuth重定向URI中。
I have searched for an answer but couldnt find anything. 我已经寻找答案,但找不到任何东西。 What am I missing?
我想念什么?
As of March 2018 Strict mode is enabled by default. 自2018年3月起,默认情况下将启用严格模式。 Add the following callback URIs in your facebook App settings:
在您的facebook应用设置中添加以下回调URI:
http://localhost:44365/
HTTP://本地主机:44365 /
http://localhost:44365/ExternalLoginCallback
HTTP://本地主机:44365 / ExternalLoginCallback
http://localhost:44365/signin-facebook
HTTP://本地主机:44365 /登入Facebook的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.