From 9e56c4eee1d97227b821d643640d2d1db593aba7 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Fri, 23 Jan 2026 19:52:39 -0500 Subject: [PATCH] fix: correct property name for TOTP enabled flag in parseTotpEnabled function --- SharpbinV3.Client/src/lib/utils/totp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharpbinV3.Client/src/lib/utils/totp.ts b/SharpbinV3.Client/src/lib/utils/totp.ts index 0089934..88711a1 100644 --- a/SharpbinV3.Client/src/lib/utils/totp.ts +++ b/SharpbinV3.Client/src/lib/utils/totp.ts @@ -2,7 +2,7 @@ export function parseTotpEnabled(tokenValue: string | null) { if (!tokenValue) return false; try { const payload = JSON.parse(atob(tokenValue.split('.')[1])); - const flag = payload?.totp; + const flag = payload?.totp_enabled; if (typeof flag === 'string') return flag.toLowerCase() === 'true'; return Boolean(flag); } catch {