Gregniuki commited on
Commit
3cbd46c
1 Parent(s): e0fefa6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
 
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: