小编Rom*_*man的帖子

ReferenceError:文档未定义 - Firebase appcheck 与 React

我正在尝试将 appcheck 集成到我的 Firebase React 中,我使用 TypeScript Web 版本 9。我将下面的代码添加到我的 Functions/src/index.ts 中

我的 appcheck 集成代码:

const { initializeAppCheck, ReCaptchaV3Provider } = require("firebase/app-check");

const firebaseConfig = { .. app info..};
const app = initializeApp(firebaseConfig);

const appCheck = initializeAppCheck(app, {
    provider: new ReCaptchaV3Provider(' myKeyString '),
  
    // Optional argument. If true, the SDK automatically refreshes App Check
    // tokens as needed.
    isTokenAutoRefreshEnabled: true
  });
Run Code Online (Sandbox Code Playgroud)

完整错误描述: 错误:解析函数触发器时发生错误。

ReferenceError:文档未在makeDiv(.../functions/node_modules/@firebase/app-check/dist/index.cjs.js:1150:24)处定义在initializeV3(.../functions/node_modules/@firebase/ app-check/dist/index.cjs.js:1095:17) 在 ReCaptchaV3Provider.initialize (.../functions/node_modules/@firebase/app-check/dist/index.cjs.js:1295:9) 在 _activate (.../functions/node_modules/@firebase/app-check/dist/index.cjs.js:1599:23)在initializeAppCheck(.../functions/node_modules/@firebase/app-check/dist/index.html) cjs.js:1555:5) 在对象。(.../functions/lib/index.js:25:18) 在 Module._compile (节点:internal/modules/cjs/loader:1095:14) 在 Object.Module._extensions..js (节点:internal/ module/cjs/loader:1124:10) …

javascript firebase firebase-app-check

5
推荐指数
1
解决办法
1253
查看次数

标签 统计

firebase ×1

firebase-app-check ×1

javascript ×1