Firebase身份验证与Firebase管理员 [英] Firebase Authentication vs Firebase Admin

查看:80
本文介绍了Firebase身份验证与Firebase管理员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

firebase身份验证和firebase管理员之间有什么区别?

what is the difference between firebase authentication and firebase admin?

据我所知,firebase管理员具有身份验证功能,并且可以绕过安全性,这与firebase身份验证不同.并且firebase admin是在服务器端实现的,而firebase身份验证主要是在客户端进行的.

As far as I know, firebase admin has authentication features and it can bypass security, unlike firebase authentication. And firebase admin is implemented in server-side while firebase authentication is mostly at the client side.

我想知道为什么Firebase身份验证应该在客户端,为什么我们应该使用Firebase身份验证而不是Firebase admin进行身份验证功能.

I want to know why firebase authentication should be at client side and why we should use firebase authentication instead of firebase admin for authentication feature.

推荐答案

Firebase身份验证是一种产品,可让您编写代码以使用户登录到您的应用程序,并限制用户对其他Firebase产品中资源的访问.为各种平台提供了SDK.

Firebase Authentication is a product that allows you to write code to get your users logged into your app, and limit user access to resources in other Firebase products. SDKs are provided for a variety of platforms.

Fireabse Admin是一个SDK,可让您在后端上编写代码来处理Firebase和Google Cloud服务(例如实时数据库,Firestore,Cloud Storage和Cloud Messaging)中的数据.如您所说,它仅用于后端,并且绕过为客户端应用程序建立的常规安全措施.

Fireabse Admin is an SDK that allows you to write code on your backend that manipulates data in Firebase and Google Cloud services (such as Realtime Database, Firestore, Cloud Storage, and Cloud Messaging). As you said, it's for backend only, and bypasses normal security measures established for client apps.

之所以不能在您的应用程序中使用Firebase Admin SDK,是因为您必须随应用程序一起提供私有凭据才能使该SDK运行.在您的应用程序中传送凭据是一个巨大的安全漏洞-请勿这样做.在恶意用户无法对您的代码进行反向工程和使用您的凭据的情况下,将它们安全地保存在您的后端.

The reason why you can't use the Firebase Admin SDK in your app is because you would have to ship private credentials with your app in order for the SDK to operate. Shipping your credentials in your app is a massive security hole - don't do it. Keep them safe on your backend where malicious users can't reverse engineer your code and use your credentials.

这篇关于Firebase身份验证与Firebase管理员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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