reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

How implement appcheck in reactfire v3?

Open mig2793 opened this issue 2 years ago • 2 comments

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

mig2793 avatar Sep 13 '22 16:09 mig2793

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

HYACCCINT avatar Jun 29 '23 18:06 HYACCCINT

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?

HenrikBechmann avatar Nov 13 '23 02:11 HenrikBechmann