Reputation: 307
So I am pretty much using the default MVC-template that includes OAuth authentication with facebook. But after authenticating I am getting an HTTP ERROR 500
.
I am using OAuth Version 4.0. My ConfigureAuth looks like this:
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.
I have searched for an answer but couldnt find anything. What am I missing?
Upvotes: 0
Views: 610
Reputation: 1009
As of March 2018 Strict mode is enabled by default. Add the following callback URIs in your facebook App settings:
Upvotes: 1