Skip to content

Commit 2195b23

Browse files
committed
fixes bug with create_reset_password_link in emailpassword recip
1 parent 4106316 commit 2195b23

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

CHANGELOG.md

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

99
## [unreleased]
1010

11+
## [0.17.0] - 2023-11-14
12+
- Fixes `create_reset_password_link` in the emailpassword recipe wherein we passed the `rid` instead of the token in the link
13+
14+
### Breaking fix
15+
- Fixed spelling of `CreateResetPasswordLinkUnknownUserIdError` in `create_reset_password_link`. It used to be `CreateResetPasswordLinkUknownUserIdError`
16+
1117
## [0.16.8] - 2023-11-7
1218

1319
### Added

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.16.8",
73+
version="0.17.0",
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
@@ -14,7 +14,7 @@
1414
from __future__ import annotations
1515

1616
SUPPORTED_CDI_VERSIONS = ["3.0"]
17-
VERSION = "0.16.8"
17+
VERSION = "0.17.0"
1818
TELEMETRY = "/telemetry"
1919
USER_COUNT = "/users/count"
2020
USER_DELETE = "/user/remove"

supertokens_python/recipe/emailpassword/asyncio/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from supertokens_python.recipe.emailpassword.interfaces import (
2222
CreateResetPasswordWrongUserIdError,
23-
CreateResetPasswordLinkUknownUserIdError,
23+
CreateResetPasswordLinkUnknownUserIdError,
2424
CreateResetPasswordLinkOkResult,
2525
SendResetPasswordEmailOkResult,
2626
SendResetPasswordEmailUnknownUserIdError,
@@ -139,14 +139,14 @@ async def create_reset_password_link(
139139
):
140140
token = await create_reset_password_token(tenant_id, user_id, user_context)
141141
if isinstance(token, CreateResetPasswordWrongUserIdError):
142-
return CreateResetPasswordLinkUknownUserIdError()
142+
return CreateResetPasswordLinkUnknownUserIdError()
143143

144144
recipe_instance = EmailPasswordRecipe.get_instance()
145145
return CreateResetPasswordLinkOkResult(
146146
link=get_password_reset_link(
147147
recipe_instance.get_app_info(),
148-
recipe_instance.get_recipe_id(),
149148
token.token,
149+
recipe_instance.get_recipe_id(),
150150
tenant_id,
151151
)
152152
)
@@ -156,7 +156,7 @@ async def send_reset_password_email(
156156
tenant_id: str, user_id: str, user_context: Optional[Dict[str, Any]] = None
157157
):
158158
link = await create_reset_password_link(tenant_id, user_id, user_context)
159-
if isinstance(link, CreateResetPasswordLinkUknownUserIdError):
159+
if isinstance(link, CreateResetPasswordLinkUnknownUserIdError):
160160
return SendResetPasswordEmailUnknownUserIdError()
161161

162162
user = await get_user_by_id(user_id, user_context)

supertokens_python/recipe/emailpassword/interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, link: str):
6262
self.link = link
6363

6464

65-
class CreateResetPasswordLinkUknownUserIdError:
65+
class CreateResetPasswordLinkUnknownUserIdError:
6666
pass
6767

6868

supertokens_python/recipe/thirdpartyemailpassword/asyncio/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from supertokens_python.recipe.thirdpartyemailpassword.interfaces import (
2525
CreateResetPasswordWrongUserIdError,
26-
CreateResetPasswordLinkUknownUserIdError,
26+
CreateResetPasswordLinkUnknownUserIdError,
2727
CreateResetPasswordLinkOkResult,
2828
SendResetPasswordEmailUnknownUserIdError,
2929
SendResetPasswordEmailEmailOkResult,
@@ -189,7 +189,7 @@ async def create_reset_password_link(
189189
):
190190
token = await create_reset_password_token(tenant_id, user_id, user_context)
191191
if isinstance(token, CreateResetPasswordWrongUserIdError):
192-
return CreateResetPasswordLinkUknownUserIdError()
192+
return CreateResetPasswordLinkUnknownUserIdError()
193193

194194
recipe_instance = ThirdPartyEmailPasswordRecipe.get_instance()
195195

@@ -212,7 +212,7 @@ async def send_reset_password_email(
212212
user_context: Optional[Dict[str, Any]] = None,
213213
):
214214
link = await create_reset_password_link(tenant_id, user_id, user_context)
215-
if isinstance(link, CreateResetPasswordLinkUknownUserIdError):
215+
if isinstance(link, CreateResetPasswordLinkUnknownUserIdError):
216216
return SendResetPasswordEmailUnknownUserIdError()
217217

218218
user = await get_user_by_id(user_id, user_context)

supertokens_python/recipe/thirdpartyemailpassword/interfaces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
CreateResetPasswordOkResult = EPInterfaces.CreateResetPasswordOkResult
1919
CreateResetPasswordWrongUserIdError = EPInterfaces.CreateResetPasswordWrongUserIdError
2020
CreateResetPasswordLinkOkResult = EPInterfaces.CreateResetPasswordLinkOkResult
21-
CreateResetPasswordLinkUknownUserIdError = (
22-
EPInterfaces.CreateResetPasswordLinkUknownUserIdError
21+
CreateResetPasswordLinkUnknownUserIdError = (
22+
EPInterfaces.CreateResetPasswordLinkUnknownUserIdError
2323
)
2424
SendResetPasswordEmailEmailOkResult = EPInterfaces.SendResetPasswordEmailOkResult
2525
SendResetPasswordEmailUnknownUserIdError = (

0 commit comments

Comments
 (0)