feat: add passkey API support for signup and login methods#1114
Merged
Conversation
pmathew92
reviewed
Jun 8, 2026
|
@amitsingh05667 update the |
pmathew92
reviewed
Jun 9, 2026
pmathew92
reviewed
Jun 9, 2026
yogeshchoudhary147
approved these changes
Jun 9, 2026
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 API support to
auth0-react, makingpasskey.signupandpasskey.loginavailable through theuseAuth0hook.Changes
passkey: PasskeyApiClienttoAuth0ContextInterfaceand exposed it viauseAuth0passkey.signup/passkey.loginwith state dispatch soisAuthenticatedanduserupdate after a successful flowAuth0ClientmockUsage
Testing
Automated
npx jest --no-coverage— 126 tests)npx tsc --noEmit— zero TypeScript errorspasskey.signup(): returnsTokenEndpointResponse, dispatches auth state updatepasskey.login(): returnsTokenEndpointResponse, forwards options, dispatches auth state updatepasskey.signup()/passkey.login(): errors are re-thrown viatokenError()passkeyobject is available onuseAuth0contextManual (tested on
https://amitom5.acmetest.orgwith Auth0 custom domain)Setup
amitom5.acmetest.org(nginx + mkcert TLS,/etc/hosts→127.0.0.1)Username-Password-Authenticationconnection, Refresh Token Rotation enabledSignup flow
passkey.signup({ email: 'user@example.com', realm: 'Username-Password-Authentication' })triggers browser WebAuthn credential creation promptisAuthenticatedbecomestrueanduseris populated in React stateLogin flow
passkey.login({ realm: 'Username-Password-Authentication' })triggers browser WebAuthn assertion prompt for an existing passkeyisAuthenticatedbecomestrueanduseris populated in React stateError cases
PasskeyErrorwith the user's cancellation reasonpasskey.login()before any passkey is registered returnsinvalid_grant: Invalid passkeyfrom the server (expected — no credential exists)localhost(no custom domain) fails with RP ID mismatch — confirmed passkeys require the exact registered origin