From f28e410aade70e8d5672e631e40a7b1f9e1842f7 Mon Sep 17 00:00:00 2001 From: Marcos Reifonas Date: Mon, 17 Aug 2026 19:56:48 +0000 Subject: [PATCH] =?UTF-8?q?fix(auth):=20for=C3=A7ar=20envio=20da=20options?= =?UTF-8?q?.redirectTo=20no=20signInWithOAuth=20para=20agradar=20valida?= =?UTF-8?q?=C3=A7=C3=A3o=20do=20Supabase=20GoTrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useAuth.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index ec90b65..81118a5 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -340,12 +340,15 @@ export function AuthProvider({ children }: { children: ReactNode }) { provider: 'keycloak', options: { scopes: 'openid email profile', + redirectTo: window.location.origin + '/' } }); - return { error }; - } catch (error) { - logger.error('Erro crítico no login SSO:', error); - return { error }; + if (error) { + return { error }; + } + return { error: null }; + } catch (err: any) { + return { error: err }; } };