From 2d34d70948692fd02f561a77e0f84fcd83192be9 Mon Sep 17 00:00:00 2001 From: "jihoon87.lee" Date: Thu, 5 Feb 2026 15:39:44 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89?= =?UTF-8?q?=ED=8A=B8=20=EC=B2=98=EB=A6=AC=EC=99=80=20UI=20=EA=B7=B8?= =?UTF-8?q?=EB=9D=BC=EB=94=94=EC=96=B8=ED=8A=B8=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit app/auth/callback/route.ts - 이메일 인증 완료 판별을 세션 생성 시간 기준에서 쿼리 파라미터(auth_type=signup) 기반으로 변경 - 회원가입 인증인 경우 자동 로그인 세션 종료 후 로그인 페이지로 리다이렉트 처리 features/auth/actions.ts - 회원가입 시 이메일 리다이렉트 URL에 auth_type=signup 쿼리 파라미터 추가 app/forgot-password/page.tsx - 배경 및 카드 아이콘의 Tailwind 클래스명 일부 수정(bg-gradient-to→bg-linear-to, radial-gradient var() 구문 정리) app/login/page.tsx - 배경 및 카드 아이콘의 Tailwind 클래스명 일부 정리 및 일관화 app/reset-password/page.tsx - 배경 및 카드 아이콘의 Tailwind 클래스명 일부 정리 및 일관화 app/signup/page.tsx - 배경 및 카드 아이콘의 Tailwind 클래스명 일부 정리 및 일관화 features/auth/components/reset-password-form.tsx - 버튼 그라디언트 클래스명(bg-gradient-to-r→bg-linear-to-r) 수정 --- app/auth/callback/route.ts | 16 +++++----------- app/forgot-password/page.tsx | 10 +++++----- app/login/page.tsx | 8 ++++---- app/reset-password/page.tsx | 8 ++++---- app/signup/page.tsx | 8 ++++---- features/auth/actions.ts | 2 +- features/auth/components/reset-password-form.tsx | 2 +- 7 files changed, 24 insertions(+), 30 deletions(-) diff --git a/app/auth/callback/route.ts b/app/auth/callback/route.ts index 7873e82..a214264 100644 --- a/app/auth/callback/route.ts +++ b/app/auth/callback/route.ts @@ -65,20 +65,14 @@ export async function GET(request: NextRequest) { // code 교환으로 세션이 생성된 상태입니다. // ---------------------------------------------------------------------- - const { - data: { user }, - } = await supabase.auth.getUser(); - - // 회원가입 직후 인증 여부 확인 (생성된 지 1분 이내) - // 별도의 type 파라미터 없이 데이터 기반으로 판단합니다. - const isNewUser = - user && - user.created_at && - new Date(user.created_at).getTime() > Date.now() - 60 * 1000; // 1분 이내 생성 + // 회원가입 인증 여부 확인 (쿼리 파라미터 기반) + // actions.ts의 signup 함수에서 emailRedirectTo에 auth_type=signup을 추가해서 보냅니다. + const authType = requestUrl.searchParams.get("auth_type"); + const isSignupVerification = authType === "signup"; // 회원가입 인증인 경우: // 이메일 인증만 완료하고, 자동 로그인된 세션은 종료시킨 뒤 로그인 페이지로 보냅니다. - if (isNewUser) { + if (isSignupVerification) { await supabase.auth.signOut(); return NextResponse.redirect( `${origin}${AUTH_ROUTES.LOGIN}?message=${encodeURIComponent( diff --git a/app/forgot-password/page.tsx b/app/forgot-password/page.tsx index e439111..0c561f5 100644 --- a/app/forgot-password/page.tsx +++ b/app/forgot-password/page.tsx @@ -27,9 +27,9 @@ export default async function ForgotPasswordPage({ const { message } = await searchParams; return ( -
-
-
+
+
+
@@ -39,7 +39,7 @@ export default async function ForgotPasswordPage({ -
+
MAIL
@@ -72,7 +72,7 @@ export default async function ForgotPasswordPage({ diff --git a/app/login/page.tsx b/app/login/page.tsx index 691f0ba..2333e17 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -27,17 +27,17 @@ export default async function LoginPage({ const { message } = await searchParams; return ( -
+
{/* ========== 배경 그라디언트 레이어 ========== */} {/* 웹 페이지 전체 배경을 그라디언트로 채웁니다 */} {/* 라이트 모드: 부드러운 그레이 톤 (gray → white → gray) */} {/* 다크 모드: 깊은 블랙 톤으로 고급스러운 느낌 */} {/* 추가 그라디언트 효과 1: 우상단에서 시작하는 원형 그라디언트 */} -
+
{/* 추가 그라디언트 효과 2: 좌하단에서 시작하는 원형 그라디언트 */} -
+
{/* ========== 애니메이션 블러 효과 ========== */} {/* 부드럽게 깜빡이는 원형 블러로 생동감 표현 */} @@ -61,7 +61,7 @@ export default async function LoginPage({ {/* ========== 카드 헤더 영역 ========== */} {/* 아이콘 배경: 그라디언트 원형 */} -
+
👋
{/* 페이지 제목 */} diff --git a/app/reset-password/page.tsx b/app/reset-password/page.tsx index 6f0ef00..511affb 100644 --- a/app/reset-password/page.tsx +++ b/app/reset-password/page.tsx @@ -39,9 +39,9 @@ export default async function ResetPasswordPage({ const { message } = params; return ( -
-
-
+
+
+
@@ -51,7 +51,7 @@ export default async function ResetPasswordPage({ -
+
PW
diff --git a/app/signup/page.tsx b/app/signup/page.tsx index 803a118..ba588ac 100644 --- a/app/signup/page.tsx +++ b/app/signup/page.tsx @@ -17,10 +17,10 @@ export default async function SignupPage({ const { message } = await searchParams; return ( -
+
{/* 배경 그라데이션 효과 */} -
-
+
+
{/* 애니메이션 블러 효과 */}
@@ -32,7 +32,7 @@ export default async function SignupPage({ -
+
🚀
diff --git a/features/auth/actions.ts b/features/auth/actions.ts index a3947c3..3456e37 100644 --- a/features/auth/actions.ts +++ b/features/auth/actions.ts @@ -238,7 +238,7 @@ export async function signup(formData: FormData) { // 이메일 인증 완료 후 리다이렉트될 URL // 로컬 개발 환경: http://localhost:3001/auth/callback // 프로덕션: NEXT_PUBLIC_BASE_URL 환경 변수에 설정된 주소 - emailRedirectTo: `${process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3001"}/auth/callback`, + emailRedirectTo: `${process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3001"}/auth/callback?auth_type=signup`, }, }); diff --git a/features/auth/components/reset-password-form.tsx b/features/auth/components/reset-password-form.tsx index 49783c7..d7ce1d4 100644 --- a/features/auth/components/reset-password-form.tsx +++ b/features/auth/components/reset-password-form.tsx @@ -128,7 +128,7 @@ export default function ResetPasswordForm() {