MCPcopy Create free account
hub / github.com/bsoc-bitbyte/busify / googleLoginHandler

Function googleLoginHandler

frontend/src/components/GoogleAuthLogin.tsx:8–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 const [searchParams] = useSearchParams();
7 useEffect(() => {
8 const googleLoginHandler = async () => {
9 const code = searchParams.get('code');
10 await axios.post(
11 `${import.meta.env.VITE_SERVER_URL}/auth/google`,
12 {
13 code,
14 },
15 {
16 withCredentials: true,
17 }
18 );
19 window.location.replace(import.meta.env.VITE_FRONTEND_URL);
20 };
21 googleLoginHandler();
22 }, [searchParams]);
23

Callers 1

GoogleAuthLoginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected