full refresh token

This commit is contained in:
IluaAir
2025-09-27 11:24:57 +03:00
parent 3dc36a2f25
commit f4e46bef22
5 changed files with 30 additions and 34 deletions

View File

@@ -35,8 +35,8 @@ async def login(
value=result["refresh_token"],
httponly=True,
samesite="lax",
path=settings.api.v1.auth,
max_age=60 * 60 * 24 * settings.refresh_token.expire_days,
path=settings.api.v1_login_url,
max_age=60 * 60 * 24 * 7,
)
return result
@@ -46,7 +46,7 @@ async def refresh(
session: sessionDep,
current_user: RefreshUser,
response: Response,
fingerprint: str = Body(),
fingerprint: Annotated[str, Body()],
refresh_token: Annotated[str | None, Cookie(name="refresh_token")] = None,
):
if refresh_token is None:
@@ -57,7 +57,7 @@ async def refresh(
value=result["refresh_token"],
httponly=True,
samesite="lax",
path=settings.api.v1.auth,
path=settings.api.v1_login_url,
max_age=60 * 60 * 24 * settings.refresh_token.expire_days,
)
return result