You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent versions of modern browsers provide a more secure default for SameSite to your cookies and so the following message might appear in your console:
Cookie "myCookie" has "SameSite" policy set to "Lax" because it is missing a "SameSite" attribute, and "SameSite=Lax" is the default value for this attribute.
The warning appears because the SameSite policy for a cookie was not explicitly specified:
Set-Cookie: flavor=choco
You should explicitly communicate the intended SameSite policy for your cookie (rather than relying on browsers to apply SameSite=Lax automatically). This will also improve the experience across browsers as not all of them default to Lax yet.
Looking at the flask-jwt-extended library used with Flask in Zou, in the documentation there is this environment variable:
JWT_COOKIE_SAMESITE
Controls how the cookies should be sent in a cross-site browsing context. Available options are "None", "Lax", or "Strict".
To use SameSite=None, you must set this option to the string "None" as well as setting JWT_COOKIE_SECURE to True.
And this environment variable is not set in the zou config ;)
The text was updated successfully, but these errors were encountered:
I am developing a front end application that uses the authentication system of Zou in order to display account restricted pages and data.
To do that, I make a request to
/api/auth/login
and it sets theaccess_token
cookie with theSet-Cookie
header for me automatically.The issue is that in Firefox or Chromium, I get the following warning:
In Chrome based browsers, the cookie is simply rejected.
This is because the
SameSite
attribute is not set in theSet-Cookie
header sent by Zou.From the MDN documentation:
Looking at the
flask-jwt-extended
library used with Flask in Zou, in the documentation there is this environment variable:And this environment variable is not set in the zou config ;)
The text was updated successfully, but these errors were encountered: