0

I have written a generic owin middleware using oauth-2.0. I have added reference of that in asp.net web forms.The middleware is returning user identity once the user is authenticated and am trying to access in RegisterExternalLogin.aspx.cs using

var loginInfo = Context.GetOwinContext().Authentication.GetExternalLoginInfo();

which is coming as null. Please share if anyone has pointer on this issue.

ark-23
  • 1
  • 1
  • I deleted my comment since it was not a solution you can check solution on my post, i had the same issue and after few month i have fixed that http://stackoverflow.com/questions/35751137/facebook-google-oauth-fails-sometimes-on-azure-production – Vova Bilyachat Apr 09 '16 at 13:24

1 Answers1

0

In your AccountController and ManageController try to add:

ControllerContext.HttpContext.Session.RemoveAll();

Also try to create a session when you start your application

Session["value"] = 0;
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331