firebase / firebase/firebase-admin-node

[FR] auth: Allow expiry to be specified in .createCustomToken

未关闭
#1,016 26 条评论 14 个 reaction 已指派 1 人 已指派给 @prameshj 在 GitHub 查看
api: auth type: feature request
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

**Is your feature request related to a problem? Please describe.**

It would be good if you could specify the duration of time you would like the login token to be valid for. For our use at least, the result of `.createCustomToken` is mostly used immediately after being provided to the client, so we'd like to have a very short expiry time.

**Describe the solution you'd like**

Update `.createCustomToken` or a new method `.createCustomTokenWithOptions` that takes an expiry.

**Describe alternatives you've considered**

Using the details from [create custom tokens using a third-party JWT library](https://firebase.google.com/docs/auth/admin/create-custom-tokens#create_custom_tokens_using_a_third-party_jwt_library), but this seems a bit redundant when the SDK is so close to providing what is needed.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。