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

fix: sameSite: use "lax" on HTTP #338

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

aarongranick-okta
Copy link
Contributor

@aarongranick-okta aarongranick-okta commented Mar 2, 2020

Fixes issue with Chrome 80: https://blog.chromium.org/2020/02/samesite-cookie-changes-in-february.html

The main effect is that running within an iFrame is now only supported if the app is being hosted on a HTTPS protocol.

  • OAuth redirect and PKCE cookies will default to SameSite:Lax, unless running on HTTPS protocol, then cookies will use SameSite: None; Secure
  • HTTP cache will use SameSite: Lax unless running on HTTPS protocol, then cookies will use SameSite: None; Secure
  • TokenManager (if falling back to using cookie storage) will use SameSite: Lax unless the secure option is set to true, then it will use SameSite: None; Secure

TokenManager is preserving existing opt-in behavior to avoid a breaking change. The scenario is that some customers may have an app running on mixed HTTPS and HTTP and they would like the tokens accessible in both contexts. This behavior is changing in 3.0: secure will be set by default, but there is an option to opt out.

I have tested locally using HTTPS proxy via https://ngrok.com/

@aarongranick-okta aarongranick-okta force-pushed the ag-fix-samesite-secure-OKTA-281382 branch from 4cd032c to 41a6f9c Compare March 2, 2020 23:44
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

Successfully merging this pull request may close these issues.

2 participants