HttpContext.Current.User is null

Aug 25, 2014 at 12:35 PM
Edited Aug 26, 2014 at 7:38 AM
Hi!

I've configured my site like in that sample (but i use mvc 3 instead of 5).

And i have problem with authentication. In same cases after sign in on azure site i have empty HttpContext.Current.User in Application_PostAuthenticateRequest event handler in my Global.asax file. But in other cases HttpContext.Current.User contains information.

May be this is bug? I can't find problem on my side.
public void ConfigureAuth(IAppBuilder app)
        {
            app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

            app.UseCookieAuthentication(new CookieAuthenticationOptions());

            app.UseOpenIdConnectAuthentication(
                new OpenIdConnectAuthenticationOptions
                {
                    ClientId = clientId,
                    Authority = authority,
                    PostLogoutRedirectUri = postLogoutRedirectUri
                });
        }
Is that config right?

Thanks!
Aug 26, 2014 at 11:07 AM
Marked as answer by savstavr on 8/26/2014 at 4:07 AM