FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.51k stars 399 forks source link

How implement appcheck in reactfire v3? #553

Open mig2793 opened 1 year ago

mig2793 commented 1 year ago

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 ( <> </> ); }`

HYACCCINT commented 1 year ago

In this case, you'll want to try importing AppCheck and and Providers from the Firebase and ReactFire libraries: see example from docs here.

HenrikBechmann commented 9 months ago

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?