Ripas55
Ripas55

Reputation: 943

firebase app check is not working with web client?

I have followed the official firebase app check installation tutorial:

https://firebase.google.com/docs/app-check/web/recaptcha-enterprise-provider

And I'm only getting errors.

  1. I created and setup firebase project
  2. Added app check library to my app
  3. copy pasted app check initialization for web:
const appCheck = initializeAppCheck(firebaseApp, {
  provider: new ReCaptchaEnterpriseProvider(
    "my_recaptcha_key_here"
  ),
  isTokenAutoRefreshEnabled: true, // Set to true to allow auto-refresh.
});

  1. Enforced storage, enforced firestore from my console.

According to the tutorial, thats all you need to do.

RESULT:

Can't access anything from firestore, I get:

@firebase/app-check: FirebaseError: AppCheck: ReCAPTCHA error. (appCheck/recaptcha-error).

When uploading to storage, I get:

@firebase/app-check: FirebaseError: AppCheck: Fetch server returned an HTTP error status. HTTP status: 403. (appCheck/fetch-status-error).

Why is this happening, I have done all the steps in the tutorial?

Upvotes: 5

Views: 5421

Answers (1)

Gourav B
Gourav B

Reputation: 982

Please make sure that the App URL is added to the reCAPTCHA allowed domains list.

Upvotes: 12

Related Questions