feat(api): fixed jwt extraction

This commit is contained in:
Alexander 2024-06-13 16:21:38 +02:00
parent 07ee332b4c
commit 4f20d8dde0

View file

@ -121,7 +121,7 @@ if True or config("MULTI_TENANTS", cast=bool, default=False) or not tenants.tena
refresh_token_max_age = content.pop("refreshTokenMaxAge")
response = Response(
status_code=status.HTTP_302_FOUND,
headers={'Location': config("SITE_URL") + "/login?jwt=" + content})
headers={'Location': config("SITE_URL") + "/login?jwt=" + content.pop("jwt")})
response.set_cookie(key="refreshToken", value=refresh_token, path="/api/refresh",
max_age=refresh_token_max_age, secure=True, httponly=True)
return response