Updating MFA methods for user with TOTP active results in error
維護者通常 1 天內回覆
評估
這個 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.7k
- 分支
- 423
- 平均合併
- 1 天 54 分鐘
- 30 天內合併 PR
- 16
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
firebase/firebase-admin-node 的其他 Issue
-
Password policy violation is reported as `auth/internal-error` instead of a specific error code可能已有人在做 @lahirumaramba 於 16 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
firebase/firebase-admin-node#3265 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
FCM: send()/sendEachForMulticast() with `fid` return NotRegistered for a FID that Console delivers to at the same moment可能已有人在做 @Doris-Ge 於 2 天前認領。 未關閉api: messaging
難度 4/5 3-5 天 新手友好度 22/100
firebase/firebase-admin-node#3288 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
getToken() replays a failed token refresh to later callers while a valid token is cached可能已有人在做 @GUMBOKIM 於 69 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 ·
維護者通常 1 天內回覆
-
Misleading error message for THIRD_PARTY_AUTH_ERROR: raw "OAuth 2 access token" text surfaced instead of the APNs-specific message可能已有人在做 @milcho0604 於 71 天前認領。 未關閉api: messaging
難度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
維護者通常 1 天內回覆
-
api: messaging
難度 5/5 一週以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
維護者通常 1 天內回覆
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難度 2/5 1-3 小時 新手友好度 73/100
openclaw/openclaw#182077 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
aikido high security
難度 2/5 1-3 小時 新手友好度 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand mark可能已有人在做 @eric8810 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
lyswhut/lx-music-desktop#3026 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
abhigyanpatwari/GitNexus#3704 ·
維護者通常 1 天內回覆