Skip to content

Commit 3cc9124

Browse files
author
IndominusByte
committed
change default samesite from lax -> None
1 parent bddf57c commit 3cc9124

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

fastapi_jwt_auth/auth_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AuthConfig:
3434
_cookie_max_age = None
3535
_cookie_domain = None
3636
_cookie_secure = False
37-
_cookie_samesite = "lax"
37+
_cookie_samesite = None
3838

3939
# option for double submit csrf protection
4040
_cookie_csrf_protect = True

fastapi_jwt_auth/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class LoadConfig(BaseModel):
3333
authjwt_cookie_max_age: Optional[StrictInt] = None
3434
authjwt_cookie_domain: Optional[StrictStr] = None
3535
authjwt_cookie_secure: Optional[StrictBool] = False
36-
authjwt_cookie_samesite: Optional[StrictStr] = "lax"
36+
authjwt_cookie_samesite: Optional[StrictStr] = None
3737
# option for double submit csrf protection
3838
authjwt_cookie_csrf_protect: Optional[StrictBool] = True
3939
authjwt_access_csrf_cookie_key: Optional[StrictStr] = "csrf_access_token"

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_default_config():
5050
assert AuthJWT._cookie_max_age is None
5151
assert AuthJWT._cookie_domain is None
5252
assert AuthJWT._cookie_secure is False
53-
assert AuthJWT._cookie_samesite == "lax"
53+
assert AuthJWT._cookie_samesite is None
5454
# option for double submit csrf protection
5555
assert AuthJWT._cookie_csrf_protect is True
5656
assert AuthJWT._access_csrf_cookie_key == "csrf_access_token"

0 commit comments

Comments
 (0)