Updating MFA methods for user with TOTP active results in error
维护者通常 7 天内回复
评估
这个 Issue 还没有评估数据。
描述
[REQUIRED] Step 2: Describe your environment
- Operating System version: macOS 15.6.1
- Firebase SDK version: 13.5.0
- Firebase Product: auth
- Node.js version: 20.19.2
- NPM version: 11.6.2
[REQUIRED] Step 3: Describe the problem
When attempted to change anything in the MFA configuration of a user that has TOTP active, firebase throws.
Steps to reproduce:
See the following example, where I attempt to enroll user with phone factor.
let enrolledFactors = (user.multiFactor?.enrolledFactors || []) as unknown as firebase.auth.UpdateMultiFactorInfoRequest[];
if (enrolledFactors.find((f) => f.factorId === method)) {
console.log(`User ${email} is already enrolled in MFA method: ${method}`);
return;
}
await firebase.auth().updateUser(user.uid, {
multiFactor: {
enrolledFactors: [
...enrolledFactors,
{
uid: `phone:${sanitizePhoneNumber(phoneNumber)}`,
factorId: FactorId.PHONE,
phoneNumber,
},
],
},
});
If the enrolledFactors include an entry with factorId totp, it throws:
FirebaseAuthError: Unsupported second factor "{"uid":"58637419-3818-4e95-b26c-7254aa11a85b","displayName":"TOTP","factorId":"totp","enrollmentTime":"Fri, 24 Oct 2025 09:34:05 GMT","totpInfo":{}}" provided.
It does look like the firebase-admin does not support TOTP fully, even though user was able to enroll and use the TOTP method on the client just fine - and the user.multiFactor?.enrolledFactors do return it (but you can't save it back to the firebase).
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 420
- 平均合并
- 5 天 6 小时
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-node 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
firebase/firebase-admin-node#3265 ·
维护者通常 7 天内回复
-
getToken() replays a failed token refresh to later callers while a valid token is cached可能已有人在做 @GUMBOKIM 于 50 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 ·
维护者通常 7 天内回复
-
[email protected] stable dependency tree fails npm audit via Storage uuid and Firestore google-gax可能已有人在做 @lahirumaramba 于 25 天前认领。 未关闭
firebase/firebase-admin-node#3221 · 3 条评论 · 已指派 1 人 ·
维护者通常 7 天内回复
-
Misleading error message for THIRD_PARTY_AUTH_ERROR: raw "OAuth 2 access token" text surfaced instead of the APNs-specific message可能已有人在做 @milcho0604 于 52 天前认领。 未关闭api: messaging
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
维护者通常 7 天内回复
-
api: messaging
难度 5/5 一周以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
维护者通常 7 天内回复
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
prime-radiant-inc/evener#3726 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
FuRongJun-1999/dsh-memory#56 ·
维护者通常 1 天内回复
-
bug via-triage
难度 2/5 1-3 小时 新手友好度 84/100
pingdotgg/t3code#15682 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openwatersio/slackwater.xyz#152 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
OpenListTeam/OpenList-Worker#103 ·
维护者通常 1 天内回复