如何使用Firebase REST API(Python)进行用户身份验证? [英] How to use Firebase REST API(Python) for authentication of a user?

查看:196
本文介绍了如何使用Firebase REST API(Python)进行用户身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Firebase作为我的物联网应用程序的后端。在我的Raspberry Pi上使用python,我将数据存储在Firebase上。截至目前,我的数据库是公开的R / W。我使用Console> Auth> Users创建了一个虚拟帐户。我希望使用此帐户通过我的Raspberry Pi使用REST或任何lib的Python登录到我的Firebase应用程序。



登录后,我将使用数据库>规则限制用户只能读取他的数据。我是全新的Firebase新手!此外,旧版文档在Firebase上已弃用。我想知道如何继续我的应用程序。我无法找到关于如何在Python或REST API上执行此操作的任何信息。



https://firebase.google.com/docs/auth/ 这是我发现的用于认证的新文档,其中不包含使用REST API的信息。



有什么方法可以达到我的要求?任何帮助表示赞赏。

解决方案

来自Firebase Auth小组的Alfonso。



我们目前没有支持或记录的用于身份验证的REST API。

您仍然可以通过旧版控制台创建一个项目,并使用旧文档学习如何创建自定义验证令牌,并将其发送到数据库REST API进行验证。

I am using Firebase as backend for my Internet of Things app. Using python on my Raspberry Pi, I am storing data on Firebase. As of currently my database is public for r/w. I have created an dummy account using Console>Auth>Users. I want to use this account to sign in to my Firebase App through my Raspberry Pi using Python with REST or any lib.

Upon login, I will use "Database>Rule" to restrict user to r/w his data only. I am new completely new to Firebase! Also Old docs are deprecated at Firebase. I would like to know how to proceed with my app. I am unable to find any information on how to do this on Python or REST API.

https://firebase.google.com/docs/auth/ This is the new documentation I have found for authentication which contains no information for using REST API.

Is there anyway to achieve what I desire? Any help is appreciated.

解决方案

Alfonso from the Firebase Auth team.

We currently do not have a supported or documented REST API for auth.

You can still create a project through the legacy console and use the old docs to learn how to mint your own custom auth tokens, and send them over to the database REST API for authentication.

这篇关于如何使用Firebase REST API(Python)进行用户身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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