asp.net mvc - C# Owin login results in identity=null on production system -


i've got asp.net mvc 5 web project running fine on development system. reason, login using microsoft owin facebook stops working deploy solution on production system.

the callback retrieves ....error=access_denied parameter , tracked fact owin returns null identity. clue whats going on here?

update

i implemented log4net in owin code , able dive deeper:

response status code not indicate success: 400 (bad request). stack trace:         @ system.net.http.httpresponsemessage.ensuresuccessstatuscode() @ microsoft.owin.security.facebook.facebookauthenticationhandler<authenticatecoreasync>d__0.movenext() 

please not have modified facebook app match production urls, responses etc.

    private void configureauth(iappbuilder app)     {         var cookieoptions = new cookieauthenticationoptions         {             authenticationtype = defaultauthenticationtypes.applicationcookie,             loginpath = new pathstring("/account/login")         };          app.usecookieauthentication(cookieoptions);         app.useexternalsignincookie(defaultauthenticationtypes.externalcookie); // passive          app.setdefaultsigninasauthenticationtype(cookieoptions.authenticationtype);         app.usefacebookauthentication(new facebookauthenticationoptions         {             appsecret = configurationmanager.appsettings["facebookappsecret"],             appid = configurationmanager.appsettings["facebookappid"],             provider = new facebookauthenticationprovider()             {                 onauthenticated = (context) =>                 {                     context.identity.addclaim(new claim(                         identityutility.extendedclaimtypes.identityprovider,                         "facebook"));                     return task.fromresult(0);                 },                 onreturnendpoint = (context) =>                 {                     if(context.identity == null)                         throw new exception(context.response.statuscode.tostring());                     return task.fromresult(0);                 }             }         });     } 

regards, martin


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -