Firebase function: Callable request verification passed

Viewed 5569

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?

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.

Related