From 6345b17559544fb3b3b8824d242263f6074b50b0 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Thu, 22 May 2025 19:00:00 -0500 Subject: [PATCH] Temp remove csrf check --- frontend/src/components/AppleAuthProvider.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/AppleAuthProvider.tsx b/frontend/src/components/AppleAuthProvider.tsx index eaa3e5879..035237c9a 100644 --- a/frontend/src/components/AppleAuthProvider.tsx +++ b/frontend/src/components/AppleAuthProvider.tsx @@ -208,10 +208,11 @@ export function AppleAuthProvider({ if (code && state) { // Validate state for CSRF protection - const storedState = sessionStorage.getItem("apple_auth_state"); - if (state !== storedState) { - throw new Error("Invalid state parameter - potential CSRF attack"); - } + // TODO: Fix state validation later + // const storedState = sessionStorage.getItem("apple_auth_state"); + // if (state !== storedState) { + // throw new Error("Invalid state parameter - potential CSRF attack"); + // } // Clear the stored state after validation sessionStorage.removeItem("apple_auth_state"); @@ -288,10 +289,11 @@ export function AppleAuthProvider({ if (code && state) { // Validate state for CSRF protection - const storedState = sessionStorage.getItem("apple_auth_state"); - if (state !== storedState) { - throw new Error("Invalid state parameter - potential CSRF attack"); - } + // TODO: Fix state validation later + // const storedState = sessionStorage.getItem("apple_auth_state"); + // if (state !== storedState) { + // throw new Error("Invalid state parameter - potential CSRF attack"); + // } // Clear the stored state after validation sessionStorage.removeItem("apple_auth_state");