diff --git a/src/components/auth/SocialLoginButtons.tsx b/src/components/auth/SocialLoginButtons.tsx index 3fa5a80..8c8eb2f 100644 --- a/src/components/auth/SocialLoginButtons.tsx +++ b/src/components/auth/SocialLoginButtons.tsx @@ -14,10 +14,20 @@ const SocialLoginButtons = () => { console.log('๐Ÿ” Iniciando login com Google...'); console.log('๐ŸŒ URL atual:', window.location.origin); - // Determinar a URL de redirecionamento correta - const redirectUrl = window.location.hostname === 'localhost' - ? 'http://localhost:3000/' - : `${window.location.origin}/`; + // Determinar a URL de redirecionamento correta baseada no hostname + let redirectUrl; + const hostname = window.location.hostname; + + if (hostname === 'localhost') { + redirectUrl = 'http://localhost:3000/'; + } else if (hostname.includes('financehome.innova1001.com.br')) { + redirectUrl = 'https://financehome.innova1001.com.br/'; + } else if (hostname.includes('lovableproject.com')) { + redirectUrl = `${window.location.origin}/`; + } else { + // Fallback para qualquer outro domรญnio + redirectUrl = `${window.location.origin}/`; + } console.log('๐Ÿ”— URL de redirecionamento:', redirectUrl);