feat: 이메일 인증 링크를 결과 페이지(창 닫기)로 분리 + 가입 대기 화면에 로그인 버튼

- 인증 링크(verify-email)의 리다이렉트 대상을 /login?verified → /email-verified?ok=1|0 으로 변경
- 신규 EmailVerifiedPage(/email-verified): 인증 완료/실패 표시 후 창 자동 닫기 시도.
  브라우저가 사용자가 연 탭의 close 를 막을 수 있어 안내 문구 + 수동 로그인/가입 링크 병행
- SignupPage 인증 대기 화면에 '인증을 완료했어요 · 로그인하러 가기' 기본 버튼 추가
  (다른 탭에서 인증을 마친 뒤 기존 화면에서 로그인 진입)

런타임 검증: 유효 토큰→/email-verified?ok=1·무효→ok=0, 인증 후 로그인 200, SPA 라우트 제공.
백엔드 build/lint 0, 프론트 type-check/lint/build 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 21:22:23 +09:00
parent 72b05f1b69
commit 9fdcecace8
4 changed files with 246 additions and 3 deletions
+4 -3
View File
@@ -139,7 +139,8 @@ export class AuthController {
return null;
}
// 이메일 인증 링크 — 메일의 버튼에서 직접 GET 진입. 검증 후 프론트로 리다이렉트.
// 이메일 인증 링크 — 메일의 버튼에서 직접 GET 진입(보통 새 탭).
// 검증 후 결과 페이지로 리다이렉트하며, 그 페이지는 완료를 표시하고 창을 닫는다.
@Get('verify-email')
@SkipTransform()
@ApiOperation({ summary: '이메일 인증 (메일 링크)' })
@@ -149,9 +150,9 @@ export class AuthController {
): Promise<void> {
try {
await this.authService.verifyEmail(token);
res.redirect(`${this.webUrl()}/login?verified=1`);
res.redirect(`${this.webUrl()}/email-verified?ok=1`);
} catch {
res.redirect(`${this.webUrl()}/login?verified=0`);
res.redirect(`${this.webUrl()}/email-verified?ok=0`);
}
}