Skip to content

Granular passkey methods on useAuth0().passkey throw "is not a function" #1302

Closed

Description

@RaphaelFakhri

Checklist

  • The issue can be reproduced in the auth0-react sample app (or N/A).
  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

useAuth0().passkey is typed as PasskeyApiClient from @auth0/auth0-spa-js. Since spa-js 2.24.0, that type includes getSignupChallenge, getLoginChallenge and getTokenWithPasskey (auth0/auth0-spa-js#1678). Auth0Provider only puts signup, login and continueSignup on the passkey object it exposes. Calls to the granular methods compile but fail at runtime.

Reproduction

const { passkey } = useAuth0();
const { authSession, publicKey } = await passkey.getLoginChallenge();
// TypeError: passkey.getLoginChallenge is not a function

getTokenWithPasskey fails the same way, so you can't use the custom WebAuthn ceremony flow from spa-js through useAuth0.

Expected: the granular methods work through useAuth0().passkey, and getTokenWithPasskey updates isAuthenticated and user like passkey.login() does.

Additional context

The methods are missing from the object that Auth0Provider builds, so the failure doesn't depend on the browser.

auth0-react version

2.28.2 (main), with @auth0/auth0-spa-js 2.29.0

React version

19.3.1

Which browsers have you tested in?

Other (Jest with jsdom; the failure does not depend on the browser)

Activity

  1. yogeshchoudhary147 commented on Oct 26, 2026

    @yogeshchoudhary147
    Contributor

    Thanks for raising this, @RaphaelFakhri! We've confirmed the issue. We'll review your PR #1303 and plan to include it in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions