Skip to content

Commit 2f7fe3c

Browse files
Merge pull request #315 from supertokens/fix-user-password-put
fix: fixes user_password_put
2 parents f98e08d + 5f12838 commit 2f7fe3c

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## unreleased
99

10+
## [0.12.8] - 2023-04-19
11+
12+
- Fixed an issues that threw 500 when changing password for user from dashboard
13+
1014
## [0.12.7] - 2023-04-18
1115

1216
- Email template for verify email updated

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
setup(
7272
name="supertokens_python",
73-
version="0.12.7",
73+
version="0.12.8",
7474
author="SuperTokens",
7575
license="Apache 2.0",
7676
author_email="[email protected]",

supertokens_python/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"2.19",
2626
"2.20",
2727
]
28-
VERSION = "0.12.7"
28+
VERSION = "0.12.8"
2929
TELEMETRY = "/telemetry"
3030
USER_COUNT = "/users/count"
3131
USER_DELETE = "/user/remove"

supertokens_python/recipe/dashboard/api/userdetails/user_password_put.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def handle_user_password_put(
7070
raise Exception("Should not come here")
7171

7272
async def reset_password(
73-
recipe: Any, # FIXME
73+
form_fields: List[NormalisedFormField],
7474
create_reset_password_token: Callable[
7575
[str],
7676
Awaitable[
@@ -89,7 +89,6 @@ async def reset_password(
8989
) -> Union[
9090
UserPasswordPutAPIResponse, UserPasswordPutAPIInvalidPasswordErrorResponse
9191
]:
92-
form_fields: List[NormalisedFormField] = recipe.get_instance().config.sign_up_feature.form_fields # type: ignore # FIXME?
9392
password_form_field = [
9493
field for field in form_fields if field.id == FORM_FIELD_PASSWORD_ID
9594
][0]
@@ -122,14 +121,14 @@ async def reset_password(
122121

123122
if recipe_to_use == "emailpassword":
124123
return await reset_password(
125-
EmailPasswordRecipe,
124+
EmailPasswordRecipe.get_instance().config.sign_up_feature.form_fields,
126125
ep_create_reset_password_token,
127126
ep_reset_password_using_token,
128127
)
129128

130129
if recipe_to_use == "thirdpartyemailpassword":
131130
return await reset_password(
132-
ThirdPartyEmailPasswordRecipe,
131+
ThirdPartyEmailPasswordRecipe.get_instance().email_password_recipe.config.sign_up_feature.form_fields,
133132
tpep_create_reset_password_token,
134133
tpep_reset_password_using_token,
135134
)

0 commit comments

Comments
 (0)