import { useEffect } from 'react'; export function useCaptchaBypass() { // Single layer: Check if environment allows bypass const bypassEnabled = import.meta.env.VITE_ALLOW_CAPTCHA_BYPASS === 'true'; // Log warning if bypass is active useEffect(() => { if (bypassEnabled && typeof window !== 'undefined') { console.warn( '⚠️ CAPTCHA BYPASS IS ACTIVE\n' + 'CAPTCHA verification is disabled via VITE_ALLOW_CAPTCHA_BYPASS=true\n' + 'This should ONLY be enabled in development/preview environments.\n' + 'Ensure VITE_ALLOW_CAPTCHA_BYPASS=false in production!' ); } }, [bypassEnabled]); return { bypassEnabled, requireCaptcha: !bypassEnabled, }; }