securex
Version:
Military-grade AES-256-GCM encryption library for tokens and data, a secure JWT alternative
21 lines (16 loc) • 623 B
text/typescript
/**
* Global state shared across all securex services
* Prevents console spam and other shared behaviors
*/
// Single source of truth for security warning state
export let SECURITY_WARNING_SHOWN = false;
export function markSecurityWarningAsShown(): void {
SECURITY_WARNING_SHOWN = true;
}
export function shouldShowSecurityWarning(): boolean {
// Only show in development mode and if not already shown
const isDevelopment = typeof process !== 'undefined' &&
process.env &&
process.env.NODE_ENV !== 'production';
return isDevelopment && !SECURITY_WARNING_SHOWN;
}