diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d5c5466..5f23e0687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.17.0] - 2023-11-14 +- Fixes `create_reset_password_link` in the emailpassword recipe wherein we passed the `rid` instead of the token in the link + +### Breaking fix +- Fixed spelling of `CreateResetPasswordLinkUnknownUserIdError` in `create_reset_password_link`. It used to be `CreateResetPasswordLinkUknownUserIdError` + ## [0.16.8] - 2023-11-7 ### Added diff --git a/setup.py b/setup.py index da6cc39e2..e129656a7 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( name="supertokens_python", - version="0.16.8", + version="0.17.0", author="SuperTokens", license="Apache 2.0", author_email="team@supertokens.com", diff --git a/supertokens_python/constants.py b/supertokens_python/constants.py index 9c45916b8..2eb0fe55b 100644 --- a/supertokens_python/constants.py +++ b/supertokens_python/constants.py @@ -14,7 +14,7 @@ from __future__ import annotations SUPPORTED_CDI_VERSIONS = ["3.0"] -VERSION = "0.16.8" +VERSION = "0.17.0" TELEMETRY = "/telemetry" USER_COUNT = "/users/count" USER_DELETE = "/user/remove" diff --git a/supertokens_python/recipe/emailpassword/asyncio/__init__.py b/supertokens_python/recipe/emailpassword/asyncio/__init__.py index 21a84533e..8916a2f64 100644 --- a/supertokens_python/recipe/emailpassword/asyncio/__init__.py +++ b/supertokens_python/recipe/emailpassword/asyncio/__init__.py @@ -20,7 +20,7 @@ from supertokens_python.recipe.emailpassword.interfaces import ( CreateResetPasswordWrongUserIdError, - CreateResetPasswordLinkUknownUserIdError, + CreateResetPasswordLinkUnknownUserIdError, CreateResetPasswordLinkOkResult, SendResetPasswordEmailOkResult, SendResetPasswordEmailUnknownUserIdError, @@ -139,14 +139,14 @@ async def create_reset_password_link( ): token = await create_reset_password_token(tenant_id, user_id, user_context) if isinstance(token, CreateResetPasswordWrongUserIdError): - return CreateResetPasswordLinkUknownUserIdError() + return CreateResetPasswordLinkUnknownUserIdError() recipe_instance = EmailPasswordRecipe.get_instance() return CreateResetPasswordLinkOkResult( link=get_password_reset_link( recipe_instance.get_app_info(), - recipe_instance.get_recipe_id(), token.token, + recipe_instance.get_recipe_id(), tenant_id, ) ) @@ -156,7 +156,7 @@ async def send_reset_password_email( tenant_id: str, user_id: str, user_context: Optional[Dict[str, Any]] = None ): link = await create_reset_password_link(tenant_id, user_id, user_context) - if isinstance(link, CreateResetPasswordLinkUknownUserIdError): + if isinstance(link, CreateResetPasswordLinkUnknownUserIdError): return SendResetPasswordEmailUnknownUserIdError() user = await get_user_by_id(user_id, user_context) diff --git a/supertokens_python/recipe/emailpassword/interfaces.py b/supertokens_python/recipe/emailpassword/interfaces.py index cc6201c37..3567754fc 100644 --- a/supertokens_python/recipe/emailpassword/interfaces.py +++ b/supertokens_python/recipe/emailpassword/interfaces.py @@ -62,7 +62,7 @@ def __init__(self, link: str): self.link = link -class CreateResetPasswordLinkUknownUserIdError: +class CreateResetPasswordLinkUnknownUserIdError: pass diff --git a/supertokens_python/recipe/thirdpartyemailpassword/asyncio/__init__.py b/supertokens_python/recipe/thirdpartyemailpassword/asyncio/__init__.py index aeba3cd30..14339c346 100644 --- a/supertokens_python/recipe/thirdpartyemailpassword/asyncio/__init__.py +++ b/supertokens_python/recipe/thirdpartyemailpassword/asyncio/__init__.py @@ -23,7 +23,7 @@ from supertokens_python.recipe.thirdpartyemailpassword.interfaces import ( CreateResetPasswordWrongUserIdError, - CreateResetPasswordLinkUknownUserIdError, + CreateResetPasswordLinkUnknownUserIdError, CreateResetPasswordLinkOkResult, SendResetPasswordEmailUnknownUserIdError, SendResetPasswordEmailEmailOkResult, @@ -189,7 +189,7 @@ async def create_reset_password_link( ): token = await create_reset_password_token(tenant_id, user_id, user_context) if isinstance(token, CreateResetPasswordWrongUserIdError): - return CreateResetPasswordLinkUknownUserIdError() + return CreateResetPasswordLinkUnknownUserIdError() recipe_instance = ThirdPartyEmailPasswordRecipe.get_instance() @@ -212,7 +212,7 @@ async def send_reset_password_email( user_context: Optional[Dict[str, Any]] = None, ): link = await create_reset_password_link(tenant_id, user_id, user_context) - if isinstance(link, CreateResetPasswordLinkUknownUserIdError): + if isinstance(link, CreateResetPasswordLinkUnknownUserIdError): return SendResetPasswordEmailUnknownUserIdError() user = await get_user_by_id(user_id, user_context) diff --git a/supertokens_python/recipe/thirdpartyemailpassword/interfaces.py b/supertokens_python/recipe/thirdpartyemailpassword/interfaces.py index 617f5249a..a4ea37d76 100644 --- a/supertokens_python/recipe/thirdpartyemailpassword/interfaces.py +++ b/supertokens_python/recipe/thirdpartyemailpassword/interfaces.py @@ -18,8 +18,8 @@ CreateResetPasswordOkResult = EPInterfaces.CreateResetPasswordOkResult CreateResetPasswordWrongUserIdError = EPInterfaces.CreateResetPasswordWrongUserIdError CreateResetPasswordLinkOkResult = EPInterfaces.CreateResetPasswordLinkOkResult -CreateResetPasswordLinkUknownUserIdError = ( - EPInterfaces.CreateResetPasswordLinkUknownUserIdError +CreateResetPasswordLinkUnknownUserIdError = ( + EPInterfaces.CreateResetPasswordLinkUnknownUserIdError ) SendResetPasswordEmailEmailOkResult = EPInterfaces.SendResetPasswordEmailOkResult SendResetPasswordEmailUnknownUserIdError = (