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

Unable to create session cookie for tenant users

未关闭
#577 17 条评论 3 个 reaction 已指派 1 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

这个 Issue 还没有评估数据。

描述

api: auth

Hey everyone

I am setting up a python application and I would like to use firebase for authentication.
For normal users the login flows works fine, my problem comes when I start using tenants.


When a user authenticates to my app, it gets a token and then, after verification, the token is exchanged for a long-lived session cookie. As mentioned before, this works great for normal users.

I am using the exact code described in the docs here: https://firebase.google.com/docs/auth/admin/manage-cookies#create_session_cookie

When I authenticate users that are part of a tenant though, I can't find a way to convert their token into a session cookie.

I tried using session_cookie = auth.create_session_cookie(id_token, expires_in=expires_in, app=tenant_app) but I get always the same error message:

Error while calling Auth service (UNSUPPORTED_TENANT_OPERATION).

Am I missing something ? I am using the latest version of firebase-admin

主要语言
Python
星标
1.2k
派生
359
平均合并
3 天 9 小时
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

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

firebase/firebase-admin-python 的其他 Issue

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

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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