From 623c031a7d25c9e2da67ac6366d5be08f8db49b4 Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Tue, 4 Nov 2025 16:34:52 -0500 Subject: [PATCH] Revert "fix: handle Safari iOS auth cookie issue with delayed re-check" This reverts commit 7b3d6f421b0df7deeda4d3e1f4d45deca30da4ea. --- src/webapp/hooks/useAuth.tsx | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/webapp/hooks/useAuth.tsx b/src/webapp/hooks/useAuth.tsx index f198ddea..18edf45d 100644 --- a/src/webapp/hooks/useAuth.tsx +++ b/src/webapp/hooks/useAuth.tsx @@ -45,28 +45,8 @@ export const AuthProvider = ({ children }: { children: ReactNode }) => { }); useEffect(() => { - // Don't auto-logout on Safari iOS immediately after auth success - // Give it time for cookies to be properly set - if (query.isError && !query.isLoading && pathname !== '/') { - // Add a small delay for Safari iOS cookie handling - const isSafariIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && - /Safari/.test(navigator.userAgent) && - !/Chrome/.test(navigator.userAgent); - - if (isSafariIOS) { - setTimeout(() => { - // Re-check auth status before logging out - query.refetch().then((result) => { - if (!result.data) { - logout(); - } - }); - }, 1000); - } else { - logout(); - } - } - }, [query.isError, logout, query]); + if (query.isError && !query.isLoading && pathname !== '/') logout(); + }, [query.isError, logout]); const contextValue: AuthContextType = { user: query.data ?? null, -- 2.51.2