Refactor identity management

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 17:38:18 +00:00
parent 5c075c363e
commit a255442616
5 changed files with 21 additions and 456 deletions

View File

@@ -7,7 +7,6 @@ export const SessionFlags = {
MFA_INTENDED_PATH: 'mfa_intended_path',
MFA_CHALLENGE_ID: 'mfa_challenge_id',
AUTH_METHOD: 'auth_method',
ORPHANED_PASSWORD_DISMISSED: 'orphaned_password_dismissed',
} as const;
export type SessionFlagKey = typeof SessionFlags[keyof typeof SessionFlags];
@@ -74,27 +73,6 @@ export function clearAuthMethod(): void {
sessionStorage.removeItem(SessionFlags.AUTH_METHOD);
}
/**
* Set the orphaned password dismissed flag
*/
export function setOrphanedPasswordDismissed(): void {
sessionStorage.setItem(SessionFlags.ORPHANED_PASSWORD_DISMISSED, 'true');
}
/**
* Check if orphaned password warning has been dismissed this session
*/
export function isOrphanedPasswordDismissed(): boolean {
return sessionStorage.getItem(SessionFlags.ORPHANED_PASSWORD_DISMISSED) === 'true';
}
/**
* Clear the orphaned password dismissed flag
*/
export function clearOrphanedPasswordDismissed(): void {
sessionStorage.removeItem(SessionFlags.ORPHANED_PASSWORD_DISMISSED);
}
/**
* Clear all authentication-related session flags
*/