Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CookieManager to handle SameSite=None on iOS12 etc #269

Open
AndersAbel opened this issue Jan 30, 2020 · 0 comments
Open

Support CookieManager to handle SameSite=None on iOS12 etc #269

AndersAbel opened this issue Jan 30, 2020 · 0 comments

Comments

@AndersAbel
Copy link

AndersAbel commented Jan 30, 2020

With Google Chrome 80 coming next week, many sites are updating to MicrosoftOwin 4.1.0. It now sends an explicit SameSite=None cookie attribute if SameSiteMode is set to None. This is all done automatically when updating the Microsoft.Owin.Security package to 4.1.0, without any need to change the code in these packages.

Unfortunately iOS12 (and some more browser/OS combinations) break if an explicit Samesite=None attribute is sent. The workaround suggested by Microsoft is to use a custom CookieManager that detects the user agent, and if needed sets SameSite=(SameSiteMode)(-1). To support this, the options of each provider need to be updated with an ICookieManager property and the handlers need to call the new overload of AuthenticationHandler.GenerateCorrelationId that takes the cookie manager as a param.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant