Skip to content

feat: passkey support - #135

Merged
rmad17 merged 38 commits into
mainfrom
passkey-support
Jul 21, 2026
Merged

feat: passkey support#135
rmad17 merged 38 commits into
mainfrom
passkey-support

Conversation

@rmad17

@rmad17 rmad17 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR carves the Passkey-only slice out of #116 , which combined Passkey, My Account, and DPoP into one large diff. It's the first of three sequential branches (Passkey → My Account → DPoP), split for merge-conflict legibility — each lands as its own PR instead of one large one.

Refer to #116 for the original review discussion and feedback — the code here was reviewed there; this PR only re-sequences it.

Features

  • Passkey sign-in (ServerClient): passkey_signup_challenge,
    passkey_login_challenge, and signin_with_passkey. Call
    passkey_signup_challenge or passkey_login_challenge to get an
    auth_session and WebAuthn options for the browser, then call
    signin_with_passkey with the signed credential to complete sign-in and
    create a session. Uses the urn:okta:params:oauth:grant-type:webauthn
    grant.
  • MFA on passkey sign-in and refresh: signin_with_passkey raises
    MfaRequiredError when a second factor is required, before any session
    is created (persist=False path). get_token_by_refresh_token now raises
    the same typed MfaRequiredError via a shared MfaClient._raise_mfa_required
    helper, instead of stuffing mfa_token/mfa_requirements onto an ApiError.
  • MfaClient internals hardened alongside this: public MFA methods
    (list_authenticators, enroll_authenticator, challenge_authenticator,
    verify) now decrypt an encrypted mfa_token internally instead of
    requiring the caller to pass a raw token; error-body parsing now falls
    back safely on non-JSON responses instead of raising a raw JSON-decode
    error.

API Changes

  • New public methods: ServerClient.passkey_signup_challenge,
    passkey_login_challenge, signin_with_passkey.
  • New public models: PasskeyUserProfile, PasskeySignupChallengeResponse,
    PasskeyLoginChallengeResponse, PasskeyAuthResponse,
    PasskeyTokenResponse, PasskeyLoginResult, plus supporting WebAuthn
    option models (PasskeyRpInfo, PasskeyUserInfo, PasskeyPubKeyCredParam,
    PasskeyAuthenticatorSelection, PasskeyPublicKeyOptions).
  • New error types: PasskeyError, PasskeyErrorCode. Raised by the three
    ServerClient passkey methods.
  • AuthenticatorResponse.authenticator_type and ChallengeResponse.challenge_type
    are now typed str (previously a Literal), so a factor/challenge type
    Auth0 adds later doesn't raise a ValidationError. No change to values
    returned today.

Deprecation

Deprecation (non-breaking): the AuthenticatorType alias still imports
and resolves to its previous Literal["otp", "oob", "recovery-code"], but
now emits a DeprecationWarning on access and is scheduled for removal in
a future major release. It no longer constrains a model field. Existing
imports keep working.

@rmad17
rmad17 requested a review from a team as a code owner July 20, 2026 06:20
@rmad17 rmad17 changed the title Passkey support Jul 20, 2026
@rmad17
rmad17 requested a review from kishore7snehil July 20, 2026 14:06
kishore7snehil
kishore7snehil previously approved these changes Jul 21, 2026

@kishore7snehil kishore7snehil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

rmad17 added 2 commits July 21, 2026 14:21
Added dpop support for myaccount and passkeys

@kishore7snehil kishore7snehil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rmad17
rmad17 merged commit 727ab76 into main Jul 21, 2026
9 checks passed
@rmad17
rmad17 deleted the passkey-support branch July 21, 2026 09:15
@rmad17 rmad17 mentioned this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants