diff --git a/CHANGELOG.md b/CHANGELOG.md index ae66e04ff..65ed5469f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.30.1] - 2025-07-21 +- Adds missing register credential endpoint to the Webauthn recipe + ## [0.30.0] - 2025-05-27 ### Adds Webauthn (Passkeys) support - Adds Webauthn recipe with support for: diff --git a/setup.py b/setup.py index e4a1568d5..95fa79288 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ setup( name="supertokens_python", - version="0.30.0", + version="0.30.1", author="SuperTokens", license="Apache 2.0", author_email="team@supertokens.com", diff --git a/supertokens_python/constants.py b/supertokens_python/constants.py index 5db52c805..c83ae6a46 100644 --- a/supertokens_python/constants.py +++ b/supertokens_python/constants.py @@ -15,7 +15,7 @@ from __future__ import annotations SUPPORTED_CDI_VERSIONS = ["5.3"] -VERSION = "0.30.0" +VERSION = "0.30.1" TELEMETRY = "/telemetry" USER_COUNT = "/users/count" USER_DELETE = "/user/remove" diff --git a/supertokens_python/recipe/webauthn/__init__.py b/supertokens_python/recipe/webauthn/__init__.py index aa0c29007..8f48fba47 100644 --- a/supertokens_python/recipe/webauthn/__init__.py +++ b/supertokens_python/recipe/webauthn/__init__.py @@ -39,6 +39,7 @@ from supertokens_python.recipe.webauthn.recipe import WebauthnRecipe from supertokens_python.recipe.webauthn.types.config import ( NormalisedWebauthnConfig, + OverrideConfig, WebauthnConfig, ) @@ -60,6 +61,9 @@ def init(config: Optional[WebauthnConfig] = None): __all__ = [ "init", + "APIInterface", + "RecipeInterface", + "OverrideConfig", "WebauthnConfig", "WebauthnRecipe", "consume_recover_account_token", diff --git a/supertokens_python/recipe/webauthn/constants.py b/supertokens_python/recipe/webauthn/constants.py index 3fb62fc1c..935962252 100644 --- a/supertokens_python/recipe/webauthn/constants.py +++ b/supertokens_python/recipe/webauthn/constants.py @@ -26,6 +26,8 @@ SIGNUP_EMAIL_EXISTS_API = "/webauthn/email/exists" +REGISTER_CREDENTIAL_API = "/webauthn/credential" + # 60 seconds (60 * 1000ms) DEFAULT_REGISTER_OPTIONS_TIMEOUT = 60000 DEFAULT_REGISTER_OPTIONS_ATTESTATION = "none" diff --git a/supertokens_python/recipe/webauthn/recipe.py b/supertokens_python/recipe/webauthn/recipe.py index 727dcb15f..02465285b 100644 --- a/supertokens_python/recipe/webauthn/recipe.py +++ b/supertokens_python/recipe/webauthn/recipe.py @@ -40,6 +40,9 @@ ) from supertokens_python.recipe.webauthn.api.implementation import APIImplementation from supertokens_python.recipe.webauthn.api.recover_account import recover_account_api +from supertokens_python.recipe.webauthn.api.register_credentials import ( + register_credential_api, +) from supertokens_python.recipe.webauthn.api.register_options import register_options_api from supertokens_python.recipe.webauthn.api.sign_in import sign_in_api from supertokens_python.recipe.webauthn.api.sign_in_options import sign_in_options_api @@ -47,6 +50,7 @@ from supertokens_python.recipe.webauthn.constants import ( GENERATE_RECOVER_ACCOUNT_TOKEN_API, RECOVER_ACCOUNT_API, + REGISTER_CREDENTIAL_API, REGISTER_OPTIONS_API, SIGN_IN_API, SIGN_UP_API, @@ -365,6 +369,12 @@ def get_apis_handled(self) -> List[APIHandled]: request_id=SIGNUP_EMAIL_EXISTS_API, disabled=self.api_implementation.disable_email_exists_get, ), + APIHandled( + method="post", + path_without_api_base_path=NormalisedURLPath(REGISTER_CREDENTIAL_API), + request_id=REGISTER_CREDENTIAL_API, + disabled=self.api_implementation.disable_register_credential_post, + ), ] async def handle_api_request( @@ -425,6 +435,11 @@ async def handle_api_request( self.api_implementation, tenant_id, options, user_context ) + if request_id == REGISTER_CREDENTIAL_API: + return await register_credential_api( + self.api_implementation, tenant_id, options, user_context + ) + return None def is_error_from_this_recipe_based_on_instance(self, err: Exception):