From 1bf0dcf4f582b4d760ccb54d35992ba8bc55da97 Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Sun, 28 Dec 2025 22:00:40 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=9D=B8=EC=8B=9D=20=EC=95=88=EB=90=98=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0.=20posthog=20=EC=A3=BC=EC=84=9D?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/layout.tsx | 7 ++++--- apps/web/src/auth.tsx | 13 ++++++------- apps/web/src/stores/useAuthStore.ts | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index aefae93..0f2822d 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -11,7 +11,7 @@ import AuthProvider from '@/auth'; // import LoadingOverlay from '@/components/LoadingOverlay'; import MessageDialog from '@/components/messageDialog'; import '@/globals.css'; -import { PostHogProvider } from '@/posthog'; +// import { PostHogProvider } from '@/posthog'; import QueryProvider from '@/query'; const isDevelopment = process.env.NODE_ENV === 'development'; @@ -132,13 +132,14 @@ export default function RootLayout({ - {isDevelopment ? ( + + {/* {isDevelopment ? ( ) : ( - )} + )} */} diff --git a/apps/web/src/auth.tsx b/apps/web/src/auth.tsx index 70b8e20..db3254f 100644 --- a/apps/web/src/auth.tsx +++ b/apps/web/src/auth.tsx @@ -17,10 +17,9 @@ export default function AuthProvider({ children }: { children: React.ReactNode } const currentPathRef = useRef(pathname); useEffect(() => { - const isPublicPath = ALLOW_PATHS.includes(pathname); - // 경로가 변경되면 체크 상태 리셋 if (currentPathRef.current !== pathname) { + console.log(currentPathRef.current); setIsAuthChecked(false); redirectingRef.current = false; currentPathRef.current = pathname; @@ -31,11 +30,10 @@ export default function AuthProvider({ children }: { children: React.ReactNode } return; } - // 공개 경로는 바로 통과 - if (isPublicPath) { - setIsAuthChecked(true); - return; - } + // if (isPublicPath) { + // setIsAuthChecked(true); + // return; + // } // 이미 인증된 상태면 바로 통과 (하지만 체크는 수행) const handleAuth = async () => { @@ -43,6 +41,7 @@ export default function AuthProvider({ children }: { children: React.ReactNode } // 항상 인증 체크 수행 (세션 만료 등 확인) const authResult = await checkAuth(); + console.log('authResult', authResult); // 인증되지 않은 경우 리다이렉트 if (!authResult) { redirectingRef.current = true; diff --git a/apps/web/src/stores/useAuthStore.ts b/apps/web/src/stores/useAuthStore.ts index 633fed3..181a6f6 100644 --- a/apps/web/src/stores/useAuthStore.ts +++ b/apps/web/src/stores/useAuthStore.ts @@ -101,9 +101,9 @@ const useAuthStore = create( const { error } = await supabase.auth.signInWithOAuth({ provider: 'kakao', - options: { - redirectTo: `${process.env.NEXT_PUBLIC_APP_URL}`, - }, + // options: { + // redirectTo: `${process.env.NEXT_PUBLIC_APP_URL}`, + // }, }); if (error) throw error; From 5ef1d64afdbc2f2fac5d7e05ea8e8982d7ee6fe1 Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Sun, 28 Dec 2025 22:01:21 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore=20:=20console.log=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/auth.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/src/auth.tsx b/apps/web/src/auth.tsx index db3254f..ec5dd91 100644 --- a/apps/web/src/auth.tsx +++ b/apps/web/src/auth.tsx @@ -41,7 +41,6 @@ export default function AuthProvider({ children }: { children: React.ReactNode } // 항상 인증 체크 수행 (세션 만료 등 확인) const authResult = await checkAuth(); - console.log('authResult', authResult); // 인증되지 않은 경우 리다이렉트 if (!authResult) { redirectingRef.current = true;