Изменил куки
This commit is contained in:
parent
a9cacf5381
commit
bdfdb70683
2 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ async def get_current_user(response: Response, token: str = Depends(get_token),
|
|||
raise UserIsNotPresentException
|
||||
|
||||
access_token = create_access_token({"sub": str(user.id)})
|
||||
response.set_cookie(key="black_phoenix_access_token", value=access_token, httponly=True, samesite="none", secure=True)
|
||||
response.set_cookie(key="black_phoenix_access_token", value=access_token, httponly=True, secure=True)
|
||||
return user
|
||||
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ async def email_verification(user_code: str, uow=Depends(UnitOfWork)):
|
|||
async def login_user(response: Response, user_data: SUserLogin, uow=Depends(UnitOfWork)):
|
||||
user = await AuthService.authenticate_user(uow, user_data.email_or_username, user_data.password)
|
||||
access_token = create_access_token({"sub": str(user.id)})
|
||||
response.set_cookie("black_phoenix_access_token", access_token, httponly=True, samesite="none", secure=True)
|
||||
response.set_cookie("black_phoenix_access_token", access_token, httponly=True, secure=True)
|
||||
return {"access_token": access_token}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue