Replies: 1 comment
|
Update: I found a work-around for the missing SameSite flag. I set up the flag in my Nginx proxy setting as follows: This has solved the problem for me temporarily, but the original question still remains as to why Flask-login is unable to set the flag. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a Flask server with flask-login with Nginx redirecting the https calls from port 80 to 443. The front end running on my local machine uses Angular 2. So I have enabled CORS.
I have the following values in my flask configuration object:
flask-login correctly sets the
SameSite=Noneparameter on my session cookie. But it fails to set theSameSiteflag on theremember_tokencookie. This makes the browser reject the cookie.First I tried the Python literal
None, which did not work. Later I tried the string 'None' including the quotes, and it worked for the session cookie. But it did not set theSameSiteflag on myremember_tokencookie. Even theSecureflag is not set.The values from my browser are shown below.
remember_token=UI-99999|24a109091c35197c1f5579cf3a1fdbcf208bf956880e2b6...8115af0b432e40299c1857f99b30ab51; Expires=Fri, 01 Jul 2022 06:34:01 GMT; HttpOnly; Path=/
session=.eJwdjjEOwjAQBP_iGtD5nLPP-QENX4hs31pQBKSEVIi_Y1FtMavRfNzSNsUE8pOJaKZq....7kpt2dFeT9vdzJKZiC406LEP8m-93s6ewyTu-wPr9zq2.YpcIWQ.IBagkKGI8DgyDydj4VyD1xZgW-Q; Secure; HttpOnly; Path=/; SameSite=None
Vary:Origin, Cookie
All reactions