Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda