'Firebase function: Callable request verification passed
I have defined a firebase function like this:
exports.getTestResults = functions.region("europe-west3").https.onCall((data, context) => {
return {
test: 'Test 123'
}
})
If I call this function as follows
var getTestResults = firebase.app().functions('europe-west3').httpsCallable('getTestResults');
getTestResults({ }).then(response => {
console.log(response);
}).catch(ex => {
console.log('EXC: ' + ex);
})
I get this error/warning/whatever in the firebase function log
Callable request verification passed {"verifications":{"app":"MISSING","auth":"VALID"}}
What is the cause of this?
Solution 1:[1]
You are not using Firebase App Check, are you?
Use Firebase App Check to verify that the request for your callable function is coming from your app, not from any other client.
If you use Firebase App Check, Cloud Functions won't throw this error.
Check this for more info.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Shaurya Aher |