小编dee*_*k n的帖子

Firebase 云函数 Appcheck for https.onRequest

根据文档,我们可以添加 appcheck,如下所示,

exports.yourCallableFunction = functions.https.onCall((data, context) => {
  // context.app will be undefined if the request doesn't include a valid
  // App Check token.
  if (context.app == undefined) {
    throw new functions.https.HttpsError(
        'failed-precondition',
        'The function must be called from an App Check verified app.')
  }
});
Run Code Online (Sandbox Code Playgroud)

我现在的问题是如何为以下场景添加应用程序检查?

exports.date = functions.https.onRequest((req, res) => {

});
Run Code Online (Sandbox Code Playgroud)

firebase google-cloud-functions firebase-app-check

8
推荐指数
2
解决办法
3698
查看次数