Skip to content

이메일 인증 메일 링크 및 인증 결과 화면 수정 - #65

Merged
nariming merged 3 commits into
developfrom
fix/verification-email-content
Aug 12, 2026
Merged

nariming merged 3 commits into
developfrom
fix/verification-email-content

Conversation

@nariming

@nariming nariming commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

📌 관련 이슈

  • #00

🔎 What is this PR?

회원가입 시 발송되는 이메일 인증 메일의 안내 문구 및 인증 링크 클릭 시 결과 화면을 개선합니다.

✨ Changes

  • AuthMailService.sendVerificationEmail

    • 기존: GET /auth/verify-email?token=... 형태의 API 명세 표기와 원시 토큰 값을 메일 본문에 그대로 노출
    • 변경: app.base-url 설정값을 조합해 실제 클릭 가능한 전체 URL(https://dev.daytodo.cloud/auth/verify-email?token=...)로 안내하도록 수정
  • application.yml

    • app.base-url 프로퍼티 추가 (APP_BASE_URL 환경변수, 기본값 dev 도메인)
    • 메일 링크에 붙는 도메인을 환경별로 유동적으로 설정할 수 있도록 함
  • AuthController.verifyEmail

    • 기존: AuthResponse.EmailVerified JSON을 그대로 반환해, 메일 링크 클릭 시 브라우저에 JSON이 노출됨
    • 변경: 별도 FE 페이지 없이 컨트롤러 단에서 성공/실패 상황별 안내 문구를 담은 HTML을 직접 반환하도록 수정 (INVALID_VERIFICATION_TOKEN, EXPIRED_VERIFICATION_TOKEN 등 에러 케이스별 문구 분기 처리)
    • AuthService.verifyEmail을 비롯한 서비스 로직은 변경 없음

📷 Result


💬 To. Reviewer

  • verifyEmail 엔드포인트만 예외적으로 JSON이 아닌 HTML을 반환하도록 바꿨는데, 이 방식이 괜찮은지 확인 부탁드려요.

✅ 체크 리스트

  • base 브랜치(develop 또는 main) 최신 상태 pull 및 충돌 확인 완료
  • Reviewers 설정
  • Assignees 설정
  • Labels 설정

Summary by CodeRabbit

  • New Features

    • Added browser-friendly email verification pages for successful and unsuccessful verification attempts.
    • Verification emails now include a clickable link for easier account confirmation.
    • Verification errors provide clear, user-facing explanations.
  • Configuration

    • Added support for configuring the application URL used in email verification links.
    • Development environments include a default application URL.

@nariming nariming added the 🐛 fix develop 브랜치에서 발생한 버그를 수정하는 작업 label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@nariming, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: df921a0c-3a2d-479d-89d0-1b1ea45272ef

📥 Commits

Reviewing files that changed from the base of the PR and between 1f57ca9 and 354af12.

📒 Files selected for processing (1)
  • src/main/resources/application.yml
📝 Walkthrough

Walkthrough

The email service now sends a configured verification link. The verification endpoint returns HTML success or failure pages and maps token errors to HTTP 400 responses. The application configuration adds app.base-url and changes the notification cron key.

Changes

Email verification flow

Layer / File(s) Summary
Verification link configuration
src/main/resources/application.yml, src/main/java/com/daytodo/domain/auth/service/AuthMailService.java
app.base-url is injected into AuthMailService. Verification emails now include a clickable /auth/verify-email?token=... link. The notification cron property key contains unrelated command text.
Verification result pages
src/main/java/com/daytodo/domain/auth/controller/AuthController.java
The endpoint produces text/html, renders success pages, and returns HTTP 400 pages for expired, invalid, or other token errors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • DayTodo/DayTodo_BE#22: Introduces related email-verification controller and mail-service behavior.
  • DayTodo/DayTodo_BE#64: Modifies the same verification controller, mail URL generation, and app.base-url configuration.

Suggested reviewers: kwonwnsduf

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 이메일 인증 링크와 인증 결과 화면 개선이라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/verification-email-content

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/resources/application.yml`:
- Line 80: Restore the YAML property key on the affected line so it is exactly
course-reminder-cron with the existing ${COURSE_REMINDER_CRON:0 0 9 * * *}
value, removing the accidental git command text. Preserve the notification
configuration structure so consumers can resolve
notification.course-reminder-cron.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d459aea2-6997-46a9-94b3-882e7885c256

📥 Commits

Reviewing files that changed from the base of the PR and between 3a7d2d2 and 1f57ca9.

📒 Files selected for processing (3)
  • src/main/java/com/daytodo/domain/auth/controller/AuthController.java
  • src/main/java/com/daytodo/domain/auth/service/AuthMailService.java
  • src/main/resources/application.yml

Comment thread src/main/resources/application.yml Outdated
@nariming
nariming merged commit 1ee6dd4 into develop Aug 12, 2026
1 check passed
@nariming
nariming deleted the fix/verification-email-content branch August 12, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 fix develop 브랜치에서 발생한 버그를 수정하는 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants