fix: return numeric provider IDs in TwoFactorProviders for Android client compatibility

Co-authored-by: shuaiplus <100134295+shuaiplus@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-02 05:50:21 +00:00
committed by Shuai
parent d0c97ee573
commit 3341a9ef74
+2 -2
View File
@@ -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<string, null> = {};
for (const provider of providers) providers2[provider] = null;