Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

setup(
name="supertokens_python",
version="0.30.0",
version="0.30.1",
author="SuperTokens",
license="Apache 2.0",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion supertokens_python/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions supertokens_python/recipe/webauthn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from supertokens_python.recipe.webauthn.recipe import WebauthnRecipe
from supertokens_python.recipe.webauthn.types.config import (
NormalisedWebauthnConfig,
OverrideConfig,
WebauthnConfig,
)

Expand All @@ -60,6 +61,9 @@ def init(config: Optional[WebauthnConfig] = None):

__all__ = [
"init",
"APIInterface",
"RecipeInterface",
"OverrideConfig",
"WebauthnConfig",
"WebauthnRecipe",
"consume_recover_account_token",
Expand Down
2 changes: 2 additions & 0 deletions supertokens_python/recipe/webauthn/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions supertokens_python/recipe/webauthn/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@
)
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
from supertokens_python.recipe.webauthn.api.sign_up import sign_up_api
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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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):
Expand Down