【问题标题】:How to increase the expiry time of a firebase auth token, I don't want to use firebase client, is there a way to do something only at the backend如何增加firebase auth token的到期时间,我不想使用firebase客户端,有没有办法只在后端做某事
【发布时间】:2020-05-18 02:09:50
【问题描述】:

我使用 nodejs 使用 firebase 云功能制作了我的自定义后端,管理员 sdk 的身份验证令牌到期时间仅为 1 小时 如何在不使用 firebase-client 的情况下增加令牌的到期时间或解决此问题的方法网络应用

【问题讨论】:

    标签: node.js firebase google-cloud-functions access-token


    【解决方案1】:

    如果您是 creating custom tokens,则您必须遵守 Firebase 对 exp 声明的要求:

    exp:过期时间

    自 UNIX 纪元以来令牌过期的时间(以秒为单位)。最多可以比iat晚3600秒。

    您可能想查看session cookies,它(根据文档)允许:

    能够创建自定义过期时间从 5 分钟到 2 周不等的会话 cookie。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-28
      • 1970-01-01
      • 1970-01-01
      • 2019-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-11
      相关资源
      最近更新 更多