mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-14 18:58:10 +08:00
Fixed bug with custom reset token audience.
When adding a custom reset token audience, we still use the default one in the creation of the JWT token instead of the custom one.
This commit is contained in:
@ -307,7 +307,7 @@ class BaseUserManager(Generic[models.UC, models.UD]):
|
||||
if not user.is_active:
|
||||
raise UserInactive()
|
||||
|
||||
token_data = {"user_id": str(user.id), "aud": RESET_PASSWORD_TOKEN_AUDIENCE}
|
||||
token_data = {"user_id": str(user.id), "aud": self.reset_password_token_audience}
|
||||
token = generate_jwt(
|
||||
token_data,
|
||||
self.reset_password_token_secret,
|
||||
|
Reference in New Issue
Block a user