Can't get App Check working with flutter web #12656
Unanswered
leminenjiro
asked this question in
Q&A
Replies: 1 comment
-
Some please respond to this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have tried to utilize my flutter web app with the App Check, but I just can not get it to work... Now I wonder have anyone even using the App Check on flutter web apps, because there is barely any information found..? I have followed the very shorty documentation at https://firebase.google.com/docs/app-check/flutter/default-providers for setuping the App Check on flutter, but that have not helped a lot.. I have done all steps there, but something is still not right yet..
First I created the recaptchav3 enterprise keys on https://www.google.com/recaptcha and listed the needed domains.. then enforced storage and firestore APis and registered the app with recaptcha enterprise secret key.
Then added the App Check initialization to flutter code and used the site key on that..
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAppCheck.instance.activate(
webProvider: ReCaptchaV3Provider(recaptchaSiteKey),
);
runApp(const App());
}
It just not letting me to have access to the firebase with app check enforced on web app deployed to hosting. If I disable the App Check its is working all fine so it is not depending on the firestore or storage rules...
Running on debug work just all fine...
https://firebase.google.com/docs/app-check/flutter/debug-provider#web
Getting errors:
(12) Third-party cookie will be blocked. Learn more in the Issues tab.
POST https://content-firebaseappcheck.googleapis.com/v1/projects/my-app/apps/1:790816231641:web:d777ae69761a26f944aec8:exchangeRecaptchaV3Token?key=my-site-key 400 (Bad Request)
[2024-04-16T19:48:25.210Z] @firebase/app-check: AppCheck: Requests throttled due to 400 error. Attempts allowed again after 00m:01s (appCheck/throttled).
[2024-04-16T19:48:25.212Z] @firebase/app-check: AppCheck: Requests throttled due to 400 error. Attempts allowed again after 00m:01s (appCheck/throttled).
<> InspectionFormBloc | Error while fetching properties: [cloud_firestore/permission-denied] Missing or insufficient permissions.
Beta Was this translation helpful? Give feedback.
All reactions