Necesito pasar el token appCheck a mi solicitud en getStaticProps, pero cuando uso el método getToken( arroja el siguiente error: AppCheck is being used before activate() is called for FirebaseApp [DEFAULT] ¿Hay alguna forma de usar el token appCheck en el servicio? ¿Representación lateral?
base de fuego.js:
if (!firebase.apps.length) { firebase.initializeApp(firebaseConfig); const appCheck = firebase.appCheck(); appCheck.activate(process.env.NEXT_PUBLIC_APP_CHECK_SITE_KEY, true); }); }índice.js:
export const getStaticProps = async () => { let token appCheck .getToken(/* forceRefresh= */ false) .then(async (rs) => { token = rs.token; }) .catch((err) => { console.log(err); }); const places = await getAllPlaces(token); return { props: { places }, revalidate: 60 }; };```