reactfire
reactfire copied to clipboard
How implement appcheck in reactfire v3?
Hi
I have tried to get the current instance of firebase and doing the process from the firebase documentation, but appcheck always returns undefined.
`import React, { Suspense } from "react"; import { useFirebaseApp } from 'reactfire';
const APP_CHECK_TOKEN = 'xxxxxx';
export const AppCheckFirebase = () => { const app = useFirebaseApp(); const appCheck = app.appCheck(); appCheck.activate(APP_CHECK_TOKEN, true);
return ( <> </> ); }`
In this case, you'll want to try importing AppCheck and and Providers from the Firebase and ReactFire libraries: see example from docs here.
I've tried that and get a "@firebase/app-check: AppCheck: Requests throttled due to 400 error. Attempts allowed again after 00m:01s (appCheck/throttled)"
Captcha V3 successfully registered in firebase console.
I see something appended with $2 in call list; suspicious it may be calling for version 2 token?