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() {