Ids4新版Chrome登录遇到Samesite问题解决方法

第一种方法,在Startup中设置

image.png
          services.ConfigureExternalCookie(option =>
            {
                option.Cookie.SameSite= SameSiteMode.Unspecified;
                option.Cookie.IsEssential = true;
            });
            services.ConfigureApplicationCookie(option =>
            {
                option.Cookie.SameSite = SameSiteMode.Unspecified;
                option.Cookie.IsEssential = true;
            });

如果是第三方法登录的话 设置第三方登录的cookie如下图:

image.png

第二种方法,发布后的文件runtimeconfig.json中设置


image.png
"Microsoft.AspNetCore.SuppressSameSiteNone": "true"

你可能感兴趣的:(Ids4新版Chrome登录遇到Samesite问题解决方法)