Update app.py
Browse files
app.py
CHANGED
@@ -295,7 +295,8 @@ async def register_post(
|
|
295 |
# Redirect to the protected route
|
296 |
url = app.url_path_for("get_protected")
|
297 |
response = RedirectResponse(url, status_code=status.HTTP_303_SEE_OTHER)
|
298 |
-
|
|
|
299 |
return response
|
300 |
|
301 |
except HTTPException as e:
|
|
|
295 |
# Redirect to the protected route
|
296 |
url = app.url_path_for("get_protected")
|
297 |
response = RedirectResponse(url, status_code=status.HTTP_303_SEE_OTHER)
|
298 |
+
# response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
|
299 |
+
response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True, secure=True, samesite='Lax')
|
300 |
return response
|
301 |
|
302 |
except HTTPException as e:
|