Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda