使用多租户时在 Firebase 模拟器中查看经过身份验证的用户
我们正在构建的一个项目使用了 Google 云身份工具包多租户功能。我们正在积极使用两个租户。我们通过 Firebase 的身份验证套件与所有这些进行交互。
我注意到,使用此功能时,用户帐户不再显示在 Firestore 的 UI 中。本地模拟器也是如此。
我知道用户已创建,因为当我登录时,我会返回与 firestore 中创建的用户配置文件相匹配的正确 uid,我可以在本地模拟器中看到该用户配置文件。
我想知道是否有人可以帮助我解决以下问题之一:
有没有办法通过模拟器管理为多租户设置创建的用户?
有没有办法在本地使用 gcloud cli 来管理我在本地创建的用户?
A project that we are building uses the Google cloud identity toolkit multi-tenant feature. We have two tenants that we are actively using. We interact with all of this through Firebase's authentication suite.
I've noticed that when using this the user accounts do not show up in Firestore's UI anymore. The same goes for the local emulator.
I know the user has been created because when I log in I get back the correct uid matching the user profile created in firestore that I can see in the local emulator.
I'd like to know if anyone can help me with one of the following:
Is there a way to manage the users created for a multi-tenant setup through the emulator?
Is there a way for me to use gcloud cli locally to manage the users that I have created locally?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好消息!模拟器的更新版本将向您显示租户。运行模拟器后,尝试通过租户以用户身份登录,您的“auth”页面将神奇地获得“租户”下拉菜单。
坏消息!非默认租户用户似乎没有通过我迄今为止发现的任何导出方法持续存在。
至于在 firebase 控制台中查看这些用户,这非常简单,但需要额外的步骤。在 Firebase 控制台的“身份验证”下,您应该会看到一个租户下拉列表。
如果您打开它,将会出现一个链接“其他租户可以在 Google Cloud Console 中进行管理”。单击它,然后单击左侧的“用户”。最后在“租户”下拉列表中选择您的租户。
Good news! The updated version of the emulator will show you tenants. Once you run the emulator, attempt to login as a user through a tenant, and your "auth" page will magically get a "Tenant" dropdown.
Bad news! The non-default-tenant users don't seem to persist by any export method I have discovered so far.
As for seeing those users in the firebase console, it's pretty easy, but an extra step. Under "authentication" in the firebase console, you should see a tenant dropdown.
If you open that, there will be a link "Other tenants can be managed in the Google Cloud Console". Click it, then click "users" on the left. Finally choose your tenant in the "Tenant" dropdown.