Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

[Cookie Based authentication] Redirect to LoginPath not work

$
0
0

Hi everybody,

I'm actually working with ASP.NET 5 release candidate.

I started with the beta 8 and used this code into Startup.cs for my custom authentication :

app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                LoginPath = "/Auth/Authentification/Login",
                AuthenticationScheme = "Cookies",
                AutomaticAuthenticate = true
            });

This code works fine with the beta 8 but doesn't with the release candidate. I'm always redirected to /Account/Login.

After some research, I see that the static class "CookieAuthenticationDefaults" contains LoginPath with "/Account/Login" as value.

I tryied many issues but I don't understand why this code not works and why "CookieAuthenticationDefaults" is always used.

Thanks for your help !

Greg


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>