From f8657732dbe60aaa8fa4e85e649c0115f59e2008 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 12 Oct 2024 22:47:44 +0530 Subject: [PATCH] feat: remove CSRF token --- src/context/auth.tsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/context/auth.tsx b/src/context/auth.tsx index 2f0dcd5d..d87f42bd 100644 --- a/src/context/auth.tsx +++ b/src/context/auth.tsx @@ -82,19 +82,7 @@ const AuthProvider = ({ children }: AuthProviderProps) => { } ); - useEffect(() => { - const getCsrfToken = async () => { - try { - const { data } = await axios.get('http://localhost:8080/csrf-token'); - if (data.csrfToken) { - (axios.defaults.headers as any)['X-CSRF-TOKEN'] = data.csrfToken; - } - } catch (error) { - console.error('Error fetching CSRF token:', error); - } - }; - getCsrfToken(); - }, []); + return (