0
Es gibt ein Problem mit der Konfiguration von Cookies. In Chrome funktioniert alles gut, aber es gibt einige Probleme mit Postman. Es definiert nicht alle Cookies. (Interceptor ist eingeschaltet).netcoreapp2.0 Vorschau2. Identitätskonfiguration
Hier ist meine Identität Konfiguration
ConfigureServices()
{
services.AddAuthentication(auth =>
{
auth.DefaultChallengeScheme =CookieAuthenticationDefaults.AuthenticationScheme;
auth.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
}).AddCookieAuthentication(auth =>
{
auth.LoginPath = "/account/login";
auth.LogoutPath = "/account/logout";
}
}
Configure()
{
app.UseAuthentication();
}
Mit netcoreapp1.1 und dieser Konfiguration
Configure()
{
app.UseIdentity();
}
ConfigureServices()
{
services.Configure<IdentityOptions>(options =>
{
options.Cookies.ApplicationCookie.LoginPath = new PathString("/account/login");
options.Cookies.ApplicationCookie.LogoutPath = new PathString("/account/logout");
}
}
alles Irgendwelche Vorschläge fein
funktioniert?
Sie nur ein Cookie hinzufügen, was andere Cookies erwarten Sie? –
@JoeAudette Sie haben recht, sowohl Postbote als auch Chrome setzen nur .AspNetCore.Identity.Application cookie. Ich denke, es gibt einen Bug mit Identität. https://blogs.msdn.microsoft.com/webdev/2017/06/28/introducing-asp-net-core-2-0-preview-2/ NET-Core-Identität als Dienst ist in verschobenen Funktionen –