如何只允许我的应用程序访问没有登录的Firebase? [英] How to allow only my app to access firebase without a login?

查看:140
本文介绍了如何只允许我的应用程序访问没有登录的Firebase?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将应用的数据存储在Firebase上,这是我在Firebase上的第一个项目,比我想象的要困难得多。我已经阅读了官方文档,并且表示我们可以登录用户使用他们的电子邮件和密码或使用其他登录选项,如谷歌或Facebook等。但我不希望用户登录到我的应用程序,但只有读取和写入数据到firebase ,如果他们正在使用我的应用程序 。现在我正在使用公共规则来处理我的firebase,但是那些引用我的firebase URL的人都可以读取和写入数据库。如何克服这个问题?



在此先感谢。

解决方案

Firebase实时数据库不允许访问未授权用户



使Firebase数据库规则适用于读取& (辛坦·索尼)说的写的不是这样。

因此一个认证机制是最好的办法!

I am storing my app's data on Firebase and this being my first project on Firebase is proving to be much more difficult than I thought. I have gone through the official documentation and it says that we can login a user with their email and password or use other login options like Google or Facebook etc. However I don't want user's to login to my application but only read and write data to firebase if they are using my app. Right now I am using public rules for my firebase but then anyone with a reference to my firebase URL can read and write to the database. How do I overcome this?

Thanks in advance.

解决方案

Firebase Real-Time DB does not allow access to Un-Authorized Users.

Making the Firebase Database Rules true for Read & Write is not the way as (Chintan Soni) said.

So a Authentication mechanism is the best way!

这篇关于如何只允许我的应用程序访问没有登录的Firebase?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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