I followed the official guide to enable AppCheck. I registered my site for reCAPTCHA v3 and registered my app to use AppCheck in the firebase console. I have not yet enforced anything.
In one of my NgModules I did the following:
import {
initializeAppCheck,
ReCaptchaV3Provider,
provideAppCheck,
} from "@angular/fire/app-check";
...
provideAppCheck(() => {
return initializeAppCheck(getApp(), {
provider: new ReCaptchaV3Provider(environment.firebase.recaptchaKey),
isTokenAutoRefreshEnabled: true,
});
}),
After doing what I've mentioned above, my app no longer works. I get the following error once when my site loads:
Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unknown]: Fetching auth token failed: AppCheck: Fetch server returned an HTTP error status. HTTP status: 403. (appCheck/fetch-status-error).
And this one is printed from time to time:
Unhandled Promise rejection: cancelled ; Zone: <root> ; Task: Promise.then ; Value: cancelled undefined
In the firebase console under AppCheck API monitoring, all requests are marked as Unverified: outdated client requests
In the google recaptcha admin console, it says total requests 0.
The above happens on a deployed version of my app whose domain I have listed in the settings of the google recaptcha admin console.
What could be the issue? How do I debug it?