HTTPS和Firebase身份验证 [英] HTTPS and Firebase authentication

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

问题描述

我想知道如何验证对FireBase的请求?

I was wondering, how can I authenticate requests to FireBase?

我创建了一个新的Firebase帐户,标记为 Enable Email&密码验证,使用电子邮件/密码并在读取访问的安全规则中使用 {".read":"auth!= null"} 创建用户.

I have created new firebase account, marked Enable Email & Password Authentication, created a user with e-mail/password and using { ".read": "auth != null" } in security rules for read access.

使用适用于Chrome的PostMan插件,选择基本身份验证,输入电子邮件/密码,获取至 https://crackling-fire-NNNN.firebaseio.com/key.json ,但我总是收到{"error":"Permission denied"}.如果我删除安全规则,则可以正常工作.

Using PostMan plugin for chrome, selected basic auth, entered e-mail/password, GET to https://crackling-fire-NNNN.firebaseio.com/key.json but I always get { "error": "Permission denied" }. It is working if I remove security rules.

FireBase中不允许HTTPS基本身份验证吗?

HTTPS Basic Auth is not allowed in FireBase?

任何人都可以在纯HTTP中提供一些简单示例来说明如何对GET/PUT/DELETE请求进行身份验证吗?

Can anyone provide some simples examples in pure HTTP how to authenticate GET/PUT/DELETE requests?

谢谢!

推荐答案

如果我理解您的问题,那么您仅想将Firebase与REST服务(包括身份验证)一起使用.据我了解,如果要这样做,您将需要一个服务器来生成令牌,然后可以将其附加到查询字符串.因此,如果您想要的是使用REST服务(包括登录)的无服务器应用程序,那么答案是您不能.纠正我,如果我错了

If I understand you question, you would like to use firebase purely with REST services, including authentication. For what I understand, if you want to do that you will need a server that generates a token that then you can append to the querystring. So if what you want is a serverless app that uses REST services, including logging in, the answer is you cannot. Correct me If I'm wrong

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

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