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:
maximka1221
2021-09-23 12:54:13 +03:00
committed by GitHub
parent 0826ec5299
commit b33371542f

View File

@ -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,