diff --git a/fastapi_users/authentication/cookie.py b/fastapi_users/authentication/cookie.py index d8188f1e..430307d7 100644 --- a/fastapi_users/authentication/cookie.py +++ b/fastapi_users/authentication/cookie.py @@ -26,6 +26,7 @@ class CookieAuthentication( :param cookie_domain: Cookie domain. :param cookie_secure: Whether to only send the cookie to the server via SSL request. :param cookie_httponly: Whether to prevent access to the cookie via JavaScript. + :param cookie_samesite: Set the SameSite policy of the cookie. :param name: Name of the backend. It will be used to name the login route. :param token_audience: List of valid audiences for the JWT. """ diff --git a/fastapi_users/authentication/jwt.py b/fastapi_users/authentication/jwt.py index 8b13704a..6d7fd444 100644 --- a/fastapi_users/authentication/jwt.py +++ b/fastapi_users/authentication/jwt.py @@ -31,7 +31,7 @@ class JWTAuthentication( def __init__( self, - secret: str, + secret: SecretType, lifetime_seconds: int, tokenUrl: str = "auth/jwt/login", name: str = "jwt",