Fix: 회원가입 인증 리다이렉트 처리와 UI 그라디언트 클래스 수정

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) 수정
This commit is contained in:
2026-02-05 15:39:44 +09:00
parent 9c967af9c1
commit 2d34d70948
7 changed files with 24 additions and 30 deletions

View File

@@ -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(