Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Cannot call `getSignedUrl` when using authorized_user default credentials locally

未关闭
#2,413 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞

调研方向

首先跟踪 firebaseAdmin.credential.applicationDefault() 和 Bucket.file().getSignedUrl(),然后将 authorized_user 凭据可用的凭据字段与签名要求进行比较。完成标准是确定是否支持此凭据类型、找出已记录的变通方案,或定义所需的 SDK 更改。

由索引模型根据 Issue 内容生成。

描述

api: storage
[READ] Step 1: Are you in the right place?
  • For issues related to the code in this repository file a Github issue.
  • If the issue pertains to Cloud Firestore, read the instructions in the "Firestore issue"
    template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: macOS 11.7.9
  • Firebase SDK version: firebase-admin 11.11.0
  • Firebase Product: Cloud Storage
  • Node.js version: 18
  • NPM version: 9.9.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

I'm initializing like:

export const admin = firebaseAdmin.initializeApp({
  credential: firebaseAdmin.credential.applicationDefault(),
  ...

but when I do that am unable to call Bucket.file().getSignedUrl() with the error:

Error: Cannot sign data without `client_email`

Looking into my local Firebase credentials, I notice there is no client_email there, but there is when using service accounts. I've found some issues around that seem to say this isn't possible with a personal service account (example).

If that's true, is it not possible at all to use my personal service account to work with files? Or is there a workaround that will enable this to work?

主要语言
TypeScript
星标
1.7k
派生
419
平均合并
4 天 20 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

firebase/firebase-admin-node 的其他 Issue

查看 firebase/firebase-admin-node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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