Admin Authentication API Errors

以下是完整的錯誤代碼和說明清單,包括建議做法 Firebase Admin Node.js Authentication API 擲回的解析步驟:

錯誤代碼 說明及解決步驟
auth/claims-too-large 提供給 setCustomUserClaims() 的權利聲明酬載超過 允許的大小上限為 1000 位元組。
auth/email-already-exists 已有其他使用者使用你提供的電子郵件地址。每位使用者都必須 擁有專屬電子郵件
auth/id-token-expired 提供的 Firebase ID 權杖已過期。
auth/id-token-revoked Firebase ID 權杖已遭到撤銷。
auth/insufficient-permission 用於初始化 Admin SDK 的憑證不足 可存取要求的 Authentication 資源。詳情請參閱 設定 Firebase 專案的說明文件,說明如何產生憑證 並用於驗證 Admin SDK。
auth/internal-error Authentication 伺服器嘗試以下錯誤: 處理要求。錯誤訊息應包含 包含額外資訊的 Authentication 伺服器。如果錯誤 仍然存在,請將問題回報給 Bug Report 支援管道。
auth/invalid-argument Authentication 方法提供無效的引數。錯誤訊息應包含其他資訊。
auth/invalid-claims 提供給 setCustomUserClaims() 的自訂聲明屬性 的值無效。
auth/invalid-continue-uri 繼續網址必須是有效的網址字串。
auth/invalid-creation-time 建立時間必須是有效的世界標準時間 (UTC) 日期字串。
auth/invalid-credential 用於驗證 Admin SDK 的憑證無法用於執行所需動作。某些 Authentication 方法,例如 createCustomToken()verifyIdToken() 需要 設定透過憑證憑證初始化的 SDK,而不是使用 更新權杖或應用程式預設憑證。詳情請見 初始化 SDK: 使用憑證驗證 Admin SDK 的說明文件 憑證
auth/invalid-disabled-field 你提供的 disabled 使用者屬性值為 無效。這個值必須是布林值。
auth/invalid-display-name 你提供的 displayName 使用者屬性值為 無效。必須是非空白字串。
auth/invalid-dynamic-link-domain 提供的動態連結網域未設定或授權 。
auth/invalid-email 你提供的 email 使用者屬性值無效。 電子郵件地址必須是字串。
auth/invalid-email-verified 你提供的 emailVerified 使用者屬性值為 無效。該屬性值必須為布林值。
auth/invalid-hash-algorithm 雜湊演算法必須與支援的演算法清單中的其中一個字串相符。
auth/invalid-hash-block-size 雜湊區塊大小必須是有效的數字。
auth/invalid-hash-derived-key-length 雜湊衍生金鑰長度必須是有效數字。
auth/invalid-hash-key 雜湊鍵必須是有效的位元組緩衝區。
auth/invalid-hash-memory-cost 雜湊記憶體費用必須是有效的數字。
auth/invalid-hash-parallelization 雜湊平行處理必須是有效的數字。
auth/invalid-hash-rounds 雜湊四捨五入必須是有效的數字。
auth/invalid-hash-salt-separator 雜湊演算法鹽分隔符欄位必須是有效的位元組緩衝區。
auth/invalid-id-token 提供的 ID 權杖不是有效的 Firebase ID 權杖。
auth/invalid-last-sign-in-time 上次登入時間必須是有效的世界標準時間 (UTC) 日期字串。
auth/invalid-page-token 您在 listUsers() 中提供的下一頁憑證無效。必須是有效的非空白字串。
auth/invalid-password 你提供的 password 使用者屬性值無效。 這個值必須是至少包含六個字元的字串。
auth/invalid-password-hash 密碼雜湊必須是有效的位元組緩衝區。
auth/invalid-password-salt 密碼鹽必須是有效的位元組緩衝區
auth/invalid-phone-number 您提供的 phoneNumber 值無效。一定要有 非空白的 E.164 標準規範 ID 字串。
auth/invalid-photo-url 你提供的 photoURL 使用者屬性值無效。 必須為字串網址。
auth/invalid-provider-data providerData 必須是 UserInfo 物件的有效陣列。
auth/invalid-provider-id providerId 必須是有效的支援提供者 ID 字串。
auth/invalid-oauth-responsetype 只有一個 OAuth responseType 應設為「是」。
auth/invalid-session-cookie-duration 工作階段 Cookie 持續時間必須是介於 5 分鐘 2 週。
auth/invalid-uid 提供的 uid 必須是非空白字串,最多 128 個半形字元,
auth/invalid-user-import 要匯入的使用者記錄無效。
auth/maximum-user-count-exceeded 已超出可匯入的使用者人數上限。
auth/missing-android-pkg-name 如果需要安裝 Android 應用程式,就必須提供 Android 套件名稱。
auth/missing-continue-uri 請務必在要求中提供有效的繼續網址。
auth/missing-hash-algorithm 如要匯入含有密碼雜湊的使用者,您必須提供雜湊演算法及其參數。
auth/missing-ios-bundle-id 要求缺少軟體包 ID。
auth/missing-uid 目前的作業需要 uid ID。
auth/missing-oauth-client-secret 您必須提供 OAuth 設定用戶端密鑰,才能啟用 OIDC 代碼流程。
auth/operation-not-allowed 你的 Firebase 專案已停用提供的登入供應商。 從 啟用 Firebase 控制台的登入方式部分,
auth/phone-number-already-exists 已有另一位現有使用者在使用你所提供的 phoneNumber。每位使用者都必須有不重複的 phoneNumber
auth/project-not-found 找不到用於初始化 Admin SDK。詳情請參閱 設定 Firebase 專案的說明文件,說明如何產生憑證 並用來驗證 Admin SDK。
auth/reserved-claims 提供給一或多個自訂使用者憑證附加資訊 系統已保留 setCustomUserClaims()。例如: OIDC 特定聲明,例如 (sub、iat、iss、exp、aud、auth_time 等) 不得用作自訂聲明的鍵。
auth/session-cookie-expired 提供的 Firebase 工作階段 Cookie 已過期。
auth/session-cookie-revoked 已撤銷 Firebase 工作階段 Cookie,
auth/too-many-requests 要求數超過允許的上限。
auth/uid-already-exists 已有其他使用者使用您提供的uid。每位使用者都必須有不重複的 uid
auth/unauthorized-continue-uri 繼續網址的網域未列入許可清單。將 的網域加入許可清單 Firebase 控制台
auth/user-not-found 提供的 ID 沒有對應的現有使用者記錄。