Prevent key collision by adding ID in front of the user_id
This commit is contained in:
@@ -36,7 +36,7 @@ async def login(form: Annotated[OAuth2PasswordRequestForm, Depends()]):
|
||||
|
||||
return JSONResponse(
|
||||
await Token.create(
|
||||
user=user.id,
|
||||
user=f"id:{user.id}",
|
||||
access_token=create_token(
|
||||
user_id=user.id, offset=timedelta(settings.ACCESS_TOKEN_EXPIRE_MIN)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user