【问题标题】:Authenticate the firebase private database using rest api使用 rest api 对 firebase 私有数据库进行身份验证
【发布时间】:2023-03-26 12:43:01
【问题描述】:

生成了令牌Using this file for authentication。 之后,我通过阅读这个document生成了一个休息网址

我从我的终端 curl 中点击“https://sampleproject-763e9.firebaseio.com/USERS.json/?auth=my 从上面的文件生成的令牌”。 为了生成我的令牌,我使用了以下两件事:

  • 输入用户 ID:userM1
  • 我的 Jason,我通过进入项目设置->serviceaccounts->adminsdk 并单击 generate new private key 从 firebase 获得。

我收到了这个错误

{ "error" : "auth header 中的无效声明 'kid': '5e3994c7ce7839ecbe22b9c01e0cc0e1db2593b1' with iat: '1505402027'" }.

这就是我的数据库的样子

这些是我的私人数据库的规则。我的输出。

【问题讨论】:

    标签: firebase curl firebase-realtime-database firebase-authentication


    【解决方案1】:

    这不是获取 Firebase 机密数据库身份验证的方法。 从 json 生成令牌后,您必须通过登录生成访问令牌。

    【讨论】:

      猜你喜欢
      • 2018-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-01
      • 1970-01-01
      • 2019-08-17
      • 1970-01-01
      相关资源
      最近更新 更多