From 41221998c9142902c5f5be775ea5b4309742a640 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 05:50:21 +0000 Subject: [PATCH] fix: return numeric provider IDs in TwoFactorProviders for Android client compatibility Co-authored-by: shuaiplus <100134295+shuaiplus@users.noreply.github.com> --- src/handlers/identity.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/identity.ts b/src/handlers/identity.ts index edccfa6..c37d0b5 100644 --- a/src/handlers/identity.ts +++ b/src/handlers/identity.ts @@ -27,8 +27,8 @@ function resolveTotpSecret(userSecret: string | null, envSecret: string | undefi function twoFactorRequiredResponse(message: string = 'Two factor required.', includeRecoveryCode: boolean = false): Response { const providers = includeRecoveryCode - ? [String(TWO_FACTOR_PROVIDER_AUTHENTICATOR), String(TWO_FACTOR_PROVIDER_RECOVERY_CODE)] - : [String(TWO_FACTOR_PROVIDER_AUTHENTICATOR)]; + ? [TWO_FACTOR_PROVIDER_AUTHENTICATOR, TWO_FACTOR_PROVIDER_RECOVERY_CODE] + : [TWO_FACTOR_PROVIDER_AUTHENTICATOR]; const providers2: Record = {}; for (const provider of providers) providers2[provider] = null;