Updating MFA methods for user with TOTP active results in error
メンテナーはふだん 7 日以内に返信
@pashanka がすでに取り組んでいます。
2025年10月27日 から。
評価
この 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時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-admin-node のほかの issue
-
Password policy violation is reported as `auth/internal-error` instead of a specific error codeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
firebase/firebase-admin-node#3265 ·
メンテナーはふだん 7 日以内に返信
-
難易度 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 が 24 日前に担当しました。 オープン
firebase/firebase-admin-node#3221 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 7 日以内に返信
-
api: messaging
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
firebase/firebase-admin-node#3215 ·
メンテナーはふだん 7 日以内に返信
-
api: messaging
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
firebase/firebase-admin-node#3214 ·
メンテナーはふだん 7 日以内に返信
firebase/firebase-admin-node の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aiko-chan-ai/DiscordBotClient#380 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
vercel/ai-elements#507 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 84/100
anaclumos/qa-interns#148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信