From b33371542f295733bea2693b838a0cd6fefbf2cc Mon Sep 17 00:00:00 2001 From: maximka1221 Date: Thu, 23 Sep 2021 12:54:13 +0300 Subject: [PATCH] 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. --- fastapi_users/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_users/manager.py b/fastapi_users/manager.py index d8925576..1ce00409 100644 --- a/fastapi_users/manager.py +++ b/fastapi_users/manager.py @@ -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,