Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
How to use firebase v9 signInWithCredential correctly with OAuthProvider?

I'm trying to implement Apple Sign In with firebase's v9 modular signInWithCredential function.

I've been following the documentation on both firebase & apple side but keep getting the following error when I try to run signInWithCredential:

[TypeError: undefined is not an object (evaluating 'credential._getIdTokenResponse')]

I am able to get the Apple Sign In to pop-up & use a biometric to authenticate. This then gives me an identityToken that I've verified on jwt.io. It's only at signInWithCredentials where it throws an error.

Can anyone see what I'm doing wrong?

        const appleCredential = await AppleAuthentication.signInAsync({
            requestedScopes: [
                AppleAuthentication.AppleAuthenticationScope.FULL_NAME,
                AppleAuthentication.AppleAuthenticationScope.EMAIL
            ],
            state: csrf,
            nonce: hashedNonce
        });
        const { identityToken, authorizationCode } = appleCredential;
        if (identityToken) {

            const authCredential = new OAuthProvider(
                "apple.com"
            ).credential({
                idToken: identityToken,
                accessToken: authorizationCode,
                rawNonce: nonce // nonce value from above
            });

            signInWithCredential(authCredential)
                .then((credential) => {
                    console.log(credential?.providerId)

                }).catch(e => { console.log("error in apple auth: ", e) })
        }



about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!