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

163
Vistas
AppCheck tokens are not recognised only when using mobile

I'm developing a webapp authentication system using Firebase. When I login and use the webapp from my computer everything works fine but when I use it on mobile appcheck does not work anymore and it gives me the following error in the console:

https://content-firebaseappcheck.googleapis.com/v1/projects/nameoftheproject/apps/1:784721317237:web:5db5892bc06253ab6b173c:exchangeRecaptchaEnterpriseToken?key=myKey
Failed to load resource: the server responded with a status of 403 ()

This is the code I'm using to create initialise appCheck in my webapp:

const appCheck = initializeAppCheck(app, {
    provider: new ReCaptchaEnterpriseProvider(config[process.env.REACT_APP_ENV]['recaptcha-key']),
    isTokenAutoRefreshEnabled: true
  });

export const getAppCheckToken = async () => {
    let appCheckTokenResponse;
    try {
        appCheckTokenResponse = await getToken(appCheck, false);
    } catch(err) {

        console.log(err);
    }
    return appCheckTokenResponse.token;
}

So a typical use case for that function is this:

//This is the code from one of my functions, it's just an example to show you how I use appcheck tokens
if (querySnapshot.docs.length === 0) {
                headerAPI.headers['X-Firebase-AppCheck'] = await getAppCheckToken();

                await axios.post(signupAPI, {
                    email: email,
                    username: displayName
                }, headerAPI);

                await sendEmailVerification(auth.currentUser, {
                    url: config[process.env.REACT_APP_ENV]['url-used-to-send-mail-auth-signup'],
                    handleCodeInApp: true
                })

                props.cookieAlert('Info', 'Cookies', 'Informations here...');
            } else {
                window.location.href = '/dashboard/home';
            }

Now, I can't understand why it doesn't work on mobile...I hope my code is clear enough to let you understand my troubles, thank you in advance.

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