You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase数据库访问权限丢失求助:原Gmail账号删除重建后无法访问

恢复Firebase项目访问权限的解决方案

Hey there, let's work through getting your Firebase project access sorted out—since you're using Google Workspace (formerly G Suite) to manage accounts, there's a clear path to fix this issue:

先明确核心原因

Even though you recreated the same Gmail address, Google treats the new account as a completely separate entity (it has a unique internal ID different from the deleted original account). That's why the old permissions tied to the first account don't automatically apply to the recreated one.

Step 1: 用有权限的Workspace管理员账号操作

首先,使用拥有该Firebase项目Owner/Editor权限的Google Workspace管理员账号登录Google Cloud Console。因为Firebase项目本质上和Google Cloud项目绑定,权限调整需要在这里进行。

Step 2: 将重建的账号添加到项目IAM权限列表

  • 进入项目的 IAM & Admin > IAM 页面
  • 点击页面顶部的 Add 按钮
  • 在「New principals」输入框中填入你重建的Gmail账号地址
  • 为账号分配合适的角色:如果需要完整的Firebase管理权限,选择Firebase Admin;如果只需要基础操作权限,选Editor即可(也可以根据需求选择更细分的权限角色)
  • 点击Save,等待5-10分钟让权限在谷歌服务中同步生效

Step 3: 验证Firebase访问权限

权限同步完成后,退出当前谷歌账号,用重建的Gmail账号登录Firebase Console,此时应该可以正常访问你的项目,包括实时数据库 (my-project).firebaseio.com。

Step 4: 修复数据库规则(若有需要)

如果你的实时数据库规则曾经指定了旧账号的UID(比如规则里写了 auth.uid === "old-account-uid"),需要更新规则适配新账号:

  • 进入Firebase Console的 Realtime Database > Rules 页面
  • 将旧UID替换为重建账号的UID(可以在 Authentication > Users 页面找到新账号的UID)
  • 发布更新后的规则

内容的提问来源于stack exchange,提问作者Tremolidades

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 03:32:53