Firebase 函数:可调用请求验证通过

Mic*_*haB 7 firebase google-cloud-functions

我已经定义了一个像这样的 firebase 函数:

exports.getTestResults = functions.region("europe-west3").https.onCall((data, context) => {
    return {
        test: 'Test 123'
    }
})
Run Code Online (Sandbox Code Playgroud)

如果我调用这个函数如下

var getTestResults = firebase.app().functions('europe-west3').httpsCallable('getTestResults');
getTestResults({ }).then(response => {
    console.log(response);
}).catch(ex => {
    console.log('EXC: ' + ex);
})
Run Code Online (Sandbox Code Playgroud)

我在 firebase 函数日志中收到此错误/警告/任何内容

Callable request verification passed {"verifications":{"app":"MISSING","auth":"VALID"}}
Run Code Online (Sandbox Code Playgroud)

这是什么原因?

小智 8

您没有使用 Firebase App Check,是吗?

使用 Firebase 应用程序检查来验证可调用函数的请求是否来自您的应用程序,而不是来自任何其他客户端。

如果您使用 Firebase App Check,Cloud Functions 不会抛出此错误。

检查以获取更多信息。