Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 954
MichaB Avatar asked May 27 '21 13:05

MichaB


1 Answers

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.

like image 162
Shaurya Aher Avatar answered Nov 15 '22 18:11

Shaurya Aher