【发布时间】:2018-11-11 01:45:10
【问题描述】:
我将使用nodejs 开发一个具有复杂逻辑的新网络应用程序。
firebase 吸引了我,因为它方便的用户身份验证/登录(google、facebook、twitter、电子邮件通行证登录/注册只需几行代码和设置)
如果我在服务器端使用google cloud function 有什么问题吗?
Q1:
firestore是否完全安全?我有使用firebase realtime database的经验。但是使用firebase realtime database,所有用户一旦登录(使用任何帐户)就拥有几乎相似的权限。这是严重的安全问题Q2:使用
google cloud function可以解决上述安全问题吗?Q3:我可以在
google cloud function中执行任何逻辑,即requireing 任何外部库吗?与独立的nodejs服务器相比,google cloud function是否有任何限制?Q4(可能与主题无关):我是否应该将我的应用设计为依赖
firebase authentication,这也意味着我的应用必须调用 firebase API 来检查用户凭据和客户端 Web 需求加载 Firebase SDK。这是提高应用性能和可扩展性的良好做法吗?
非常感谢您
【问题讨论】:
-
您能详细说明 Q1 吗?以我的经验,可以在Firebase's security rules language 中实现许多安全场景。虽然 Firestore 的规则语言不同,但概念是相同的。
标签: node.js firebase firebase-authentication google-cloud-firestore google-cloud-functions