Repository navigation
Conversation
Cover signin_with_passkey with a login assertion credential and rate-limit error propagation from passkey_login_challenge. Co-Authored-By: Claude <noreply@anthropic.com>
…anges auth0-server-python removed PasskeyErrorCode.TOO_MANY_REQUESTS and now reports rate limits through PasskeyError.status_code and retry_after. The exception handler read the removed attribute, so every PasskeyError raised AttributeError instead of rendering. It now maps status_code 429 to HTTP 429 and forwards retry_after as Retry-After. The passkey wrappers forward the new client_ip argument and match the upstream verification type. The passkey guide covers client_ip trust, rate limit retries, verification requirements and account existence. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds passkey signup and login to
AuthClient, including identifier verification at signup. When a database connection requires email or phone verification, the signup challenge returnsverification_requiredandsignin_with_passkey()accepts the codes the user received.The new methods pass their arguments straight through to
ServerClientin auth0-server-python, following the existing custom token exchange methods. The SDK does not mount passkey routes. Apps add their own routes, as shown in the new guide.Changes
AuthClient(src/auth0_fastapi/auth/auth_client.py): three methods added at the end of the class. Each forwards every argument by keyword toServerClient.passkey_signup_challenge()acceptsuser_profile,connection,organization,user_metadata,delivery_method("text"or"voice") andstore_options. The response includesverification_requiredwhen the connection requires verification.passkey_login_challenge()acceptsconnection,organizationandstore_options.signin_with_passkey()exchanges the credential for tokens and establishes the session for both signup and login. It accepts optionalverificationcodes,connection,organization,scope,audience,dpop_keyandstore_options.src/auth0_fastapi/errors/__init__.py): re-exportsPasskeyErrorandPasskeyErrorCode.auth0_exception_handlermaps aPasskeyErrorwith codetoo_many_requeststo HTTP 429. OtherPasskeyErrors keep the default 400. The response body still carries onlyerrorandmessage, soauth_sessionnever appears in a generic error response.examples/Passkeys.mdcovers:README.mdgains a Passkeys feature bullet and a Passkeys section that links to the guide.Testing
test_auth_client.py: newTestPasskeyclass with 11 tests. They cover:dpop_keypassed through as the same objectPasskeyErrorpropagation, withauth_sessionandverification_requiredintactInvalidArgumentErrorfor an unknown verification keytest_errors.py(new, 3 tests): 429 mapping, the error body leaves outauth_session, an to 400.Tested flows
organizationsetdpop_key, issuing DPoP-bound tokens