Reputation: 128
I add Firebase App Check with reCAPTCHA Enterprise in my vue3 project(web app project), and work well on mode devel(debug provider). But when build on production, appcheck not working and return HTTP status: 500.
my appcheck config:
if (location.hostname === "127.0.0.1") {
self.FIREBASE_APPCHECK_DEBUG_TOKEN = true;
}
const appcheck = initializeAppCheck(app, {
provider: new ReCaptchaEnterpriseProvider(
import.meta.env.VITE_FIREBASE_RECAPTCHA_ENTERPRISE_KEY
),
isTokenAutoRefreshEnabled: true, // Set to true to allow auto-refresh.
});
error example :
https://content-firebaseappcheck.googleapis.com/v1/projects/app-name/apps/1:id:web:id:exchangeRecaptchaEnterpriseToken?key=xxxxxxxxxxxxxxxxxxxxxxxxxx 500
Upvotes: 0
Views: 351
Reputation: 128
Firebase appcheck work after we generate new site key
and replace the old one.
NB:
In our case, http error 500
occurs because one site key
is used in android app and web app. We don't know if this is indeed the problem causing the error, but after separating site key
(for android app and web app), firebase appcheck runs smoothly.
Upvotes: 0