Skip to content

Commit b734e25

Browse files
committed
fix: adds missing credential register endpoint to WebAuthn
1 parent 3725af3 commit b734e25

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

CHANGELOG.md

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

99
## [unreleased]
1010

11+
## [0.30.1] - 2025-07-21
12+
- Adds missing register credential endpoint to the Webauthn recipe
13+
1114
## [0.30.0] - 2025-05-27
1215
### Adds Webauthn (Passkeys) support
1316
- Adds Webauthn recipe with support for:

setup.py

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

8383
setup(
8484
name="supertokens_python",
85-
version="0.30.0",
85+
version="0.30.1",
8686
author="SuperTokens",
8787
license="Apache 2.0",
8888
author_email="[email protected]",

supertokens_python/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import annotations
1616

1717
SUPPORTED_CDI_VERSIONS = ["5.3"]
18-
VERSION = "0.30.0"
18+
VERSION = "0.30.1"
1919
TELEMETRY = "/telemetry"
2020
USER_COUNT = "/users/count"
2121
USER_DELETE = "/user/remove"

supertokens_python/recipe/webauthn/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
SIGNUP_EMAIL_EXISTS_API = "/webauthn/email/exists"
2828

29+
REGISTER_CREDENTIAL_API = "/webauthn/credential"
30+
2931
# 60 seconds (60 * 1000ms)
3032
DEFAULT_REGISTER_OPTIONS_TIMEOUT = 60000
3133
DEFAULT_REGISTER_OPTIONS_ATTESTATION = "none"

supertokens_python/recipe/webauthn/recipe.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,17 @@
4040
)
4141
from supertokens_python.recipe.webauthn.api.implementation import APIImplementation
4242
from supertokens_python.recipe.webauthn.api.recover_account import recover_account_api
43+
from supertokens_python.recipe.webauthn.api.register_credentials import (
44+
register_credential_api,
45+
)
4346
from supertokens_python.recipe.webauthn.api.register_options import register_options_api
4447
from supertokens_python.recipe.webauthn.api.sign_in import sign_in_api
4548
from supertokens_python.recipe.webauthn.api.sign_in_options import sign_in_options_api
4649
from supertokens_python.recipe.webauthn.api.sign_up import sign_up_api
4750
from supertokens_python.recipe.webauthn.constants import (
4851
GENERATE_RECOVER_ACCOUNT_TOKEN_API,
4952
RECOVER_ACCOUNT_API,
53+
REGISTER_CREDENTIAL_API,
5054
REGISTER_OPTIONS_API,
5155
SIGN_IN_API,
5256
SIGN_UP_API,
@@ -365,6 +369,12 @@ def get_apis_handled(self) -> List[APIHandled]:
365369
request_id=SIGNUP_EMAIL_EXISTS_API,
366370
disabled=self.api_implementation.disable_email_exists_get,
367371
),
372+
APIHandled(
373+
method="post",
374+
path_without_api_base_path=NormalisedURLPath(REGISTER_CREDENTIAL_API),
375+
request_id=REGISTER_CREDENTIAL_API,
376+
disabled=self.api_implementation.disable_register_credential_post,
377+
),
368378
]
369379

370380
async def handle_api_request(
@@ -425,6 +435,11 @@ async def handle_api_request(
425435
self.api_implementation, tenant_id, options, user_context
426436
)
427437

438+
if request_id == REGISTER_CREDENTIAL_API:
439+
return await register_credential_api(
440+
self.api_implementation, tenant_id, options, user_context
441+
)
442+
428443
return None
429444

430445
def is_error_from_this_recipe_based_on_instance(self, err: Exception):

0 commit comments

Comments
 (0)