mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: reports; improved+simplifed modals; extractError funcction;
refactor: change jwt claims to lowercase; use response dtos for sensitive data fix: nullify user on token clears; change appsettings.dev View_Internal_API_Key
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_Enabled ?? payload?.totp_enabled ?? payload?.totpEnabled;
|
||||
const flag = payload?.totp;
|
||||
if (typeof flag === 'string') return flag.toLowerCase() === 'true';
|
||||
return Boolean(flag);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user