[英]Is there a way to sign a Firebase custom token using a service account from a different project
I would like to use signInWithCustomToken to a secondary project using a token signed by a service account from a primary project.我想使用由主要项目的服务帐户签名的令牌将signInWithCustomToken用于辅助项目。
At the moment I get "Error: The custom token corresponds to a different audience."目前我得到“错误:自定义令牌对应于不同的受众。”
I was hoping that adding the signing service account to the secondary project with the Role: Service Account Token Creator would be enough to accept its tokens but it is not.我希望将签名服务帐户添加到具有角色的辅助项目:服务帐户令牌创建者就足以接受其令牌,但事实并非如此。
Is there anything else I can do to get this setup to work?我还能做些什么来让这个设置正常工作吗?
I think the answer is "it is not possible".我认为答案是“不可能”。 See statement from a Firebase team member
请参阅 Firebase 团队成员的声明
"A service account can only sign tokens for one and only one project. Any token signed by service account Foo is only valid within the parent project of Foo." “一个服务帐户只能为一个且只有一个项目签署令牌。任何由服务帐户 Foo 签署的令牌仅在 Foo 的父项目内有效。” -- hiranya911
-- hiranya911
https://github.com/firebase/firebase-admin-node/issues/634#issuecomment-525953070 https://github.com/firebase/firebase-admin-node/issues/634#issuecomment-525953070
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.