Make cookie safe

This commit is contained in:
Georges-Antoine Assi
2023-08-09 22:52:53 -04:00
parent 32a79ac52d
commit 37200aeefc

View File

@@ -42,7 +42,9 @@ def login_with_password(
data={"sub": user.username}, expires_delta=access_token_expires
)
response.set_cookie("access_token", access_token, httponly=True)
response.set_cookie(
"access_token", access_token, httponly=True, secure=True, samesite="strict"
)
return user