Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How implement appcheck in reactfire v3? #553

Open
mig2793 opened this issue Sep 13, 2022 · 2 comments
Open

How implement appcheck in reactfire v3? #553

mig2793 opened this issue Sep 13, 2022 · 2 comments

Comments

@mig2793
Copy link

mig2793 commented Sep 13, 2022

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
Copy link
Collaborator

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants