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

157
Views
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
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!