This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Support for Cookie "SameSite" Flag #908
Closed
Description
Are there any plans to implement support for the cookie SameSite
flag within the cookie authentication middleware? The flag helps mitigate CSRF attacks and is currently recognized by Chrome and Opera, and possibly more browsers soon.
I'm thinking about a new property on CookieAuthenticationOptions
, as illustrated here:
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
SameSite = SameSitePolicy.Always // or SameSitePolicy.None
// ...
});
I think this feature has a very good cost-benefit ratio. The implementation should be relatively straightforward, and it wouldn't hurt to have an additional protection measure against CSRF besides antiforgery tokens.