How to secure firebase https function?

后端 未结 1 950
我在风中等你
我在风中等你 2021-01-26 10:14

I have a firebase https function:

exports.updateDatabase = functions.https.onRequest((req, res) => {
  // ...
});

Which can be called via: h

相关标签:
1条回答
  • 2021-01-26 10:29

    You can't stop the function from being invoked by anyone who knows the URL.

    You can stop the function from doing something harmful by only allowing it to perform its intended action by requiring that an authenticated user call it, assuming you trust that user.

    There is an example of requiring authentication in the official code samples here.

    0 讨论(0)
提交回复
热议问题