firebase和firebase-admin npm模块之间有什么区别? [英] What's the difference between the firebase and the firebase-admin npm module?

查看:103
本文介绍了firebase和firebase-admin npm模块之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Firebase(身份验证,数据库和存储)构建Node.js Web应用程序.但是我对应该使用哪个模块, firebase firebase-admin (或两者)感到困惑.

I want to build a Node.js web app using Firebase (authentication, database and storage). But I get confused on which module should I use, firebase or firebase-admin (or both).

推荐答案

管理SDK使用管理权限.这意味着它绕过Firebase数据库的安全规则.它还具有管理用户和默认自定义令牌的功能,并且可以用于发送FCM消息.

The admin SDK runs your code with administrative permissions. This means it bypasses the security rules of your Firebase Database. It also has functionality to manage users and mint custom tokens and can be used to send FCM messages.

如果您使用常规(非管理员)Firebase模块,则您将作为常规Firebase客户端运行,并且没有这些扩展功能.

If you use the regular (non-admin) Firebase module, you're running as a regular Firebase client and don't have these expanded capabilities.

这篇关于firebase和firebase-admin npm模块之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆