diff --git a/c2cwsgiutils/auth.py b/c2cwsgiutils/auth.py index 60aadeccb..2f67ff1d5 100644 --- a/c2cwsgiutils/auth.py +++ b/c2cwsgiutils/auth.py @@ -93,7 +93,9 @@ def _is_auth_secret(request: pyramid.request.Request) -> bool: if secret_hash != _hash_secret(expected): return False # login or refresh the cookie - request.response.set_cookie(SECRET_ENV, secret_hash, max_age=_COOKIE_AGE, httponly=True, secure=True, SameSite="Strict") + request.response.set_cookie( + SECRET_ENV, secret_hash, max_age=_COOKIE_AGE, httponly=True, secure=True, SameSite="Strict" + ) # since this could be used from outside c2cwsgiutils views, we cannot set the path to c2c return True return False