mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
fix: correct property name for TOTP enabled flag in parseTotpEnabled function
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user