google cloud platform - How do I make firebase apphosting have access to secret manager values? - Stack Overflow

I'm trying to deploy a GitHub repository through Firebase's apphosting on a website with Next

I'm trying to deploy a GitHub repository through Firebase's apphosting on a website with NextJS 15, but I can't access the environment variables of GCP secret manager.

When I try to deploy, I get a type error like this. (it seems like I can't get the value)

Type error: Argument of type '{ apiKey: string | undefined; cookieName: string; cookieSignatureKeys: string[]; cookieSerializeOptions: { path: string; httpOnly: boolean; secure: boolean; sameSite: "strict"; maxAge: number; }; serviceAccount: { ...; }; }' is not assignable to parameter of type 'SetAuthCookiesOptions'. The types of 'serviceAccount.projectId' are incompatible between these types.

I added all the code like this to the apphosting.yaml file and also allowed access using the grantaccess command.

env:
  - variable: NEXT_PUBLIC_FIREBASE_API_KEY
    secret: API_KEY
    availability:
      - BUILD
      - RUNTIME

I am referencing this code (next_public_ is in development but I am using it in deployment. Could this be a problem?)

apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744787607a4593722.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信