Implement two-layer CAPTCHA bypass

This commit is contained in:
gpt-engineer-app[bot]
2025-10-11 00:41:13 +00:00
parent c986a54fbf
commit 21acbb948c
7 changed files with 112 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import { supabase } from '@/integrations/supabase/client';
import { useToast } from '@/hooks/use-toast';
import { TurnstileCaptcha } from './TurnstileCaptcha';
import { notificationService } from '@/lib/notificationService';
import { useCaptchaBypass } from '@/hooks/useCaptchaBypass';
interface AuthModalProps {
open: boolean;
@@ -34,9 +35,7 @@ export function AuthModal({ open, onOpenChange, defaultTab = 'signin' }: AuthMod
displayName: ''
});
// Detect iframe environment and make CAPTCHA optional for preview compatibility
const isInIframe = window.self !== window.top;
const requireCaptcha = !isInIframe;
const { requireCaptcha } = useCaptchaBypass();
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setFormData(prev => ({