猿问

.net core 使用cookie进行认证,猎豹浏览器不能登陆

startup:

services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.LoginPath = new PathString("/Account/Login");
options.AccessDeniedPath = new PathString("/Account/AccessDenied");
options.Events = new CookieAuthenticationEvents
{
OnValidatePrincipal = XT_BSP.SSO.Main.Event.LastChangedValidator.ValidateAsync
};
});

 

登陆:

HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity));

 

用fiddler抓包发现,用猎豹浏览器登陆时,会返回cookie,但是页面跳转请求时候的cookie会丢失。别的浏览器正常,IE11也是正常的。就tmd这货不走寻常路


炎炎设计
浏览 588回答 1
1回答
随时随地看视频慕课网APP
我要回答