From 0c57f9f5d3485e8a34b95cd5fc5712706f502c2e Mon Sep 17 00:00:00 2001 From: leonardomilv3 Date: Sun, 28 Jul 2024 19:55:27 -0300 Subject: [PATCH] fix: github token verification --- src/shared/contexts/Auth/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/contexts/Auth/index.tsx b/src/shared/contexts/Auth/index.tsx index 2b77a79b..5348a17b 100644 --- a/src/shared/contexts/Auth/index.tsx +++ b/src/shared/contexts/Auth/index.tsx @@ -127,7 +127,7 @@ export const AuthProvider = ({ children }: { children: JSX.Element }) => { useEffect(() => { const code = router?.query?.code; - if (code && provider === 'github') { + if (code && provider === 'github' && !token) { signInWithGithub(code as string); } }, [provider, router?.query?.code, signInWithGithub]);