Open
Conversation
- POST /auth/find-email: 본인인증(PortOne)으로 아이디 찾기 - 인증 이력 있는 사용자: CI 직접 매칭 - 미인증 사용자: 이름+생년월일 매칭 후 자동 CI 연결 (본인인증 처리) - POST /auth/password-reset/by-verification: 본인인증으로 재설정 토큰 발급 - POST /auth/password-reset/by-email: 이메일로 재설정 링크 발송 (Gmail SMTP) - POST /auth/password-reset: 토큰 검증 + 새 비밀번호 저장 (30분 유효, 1회용) 전략 패턴으로 인증 수단 확장 가능하게 설계 PasswordResetToken 엔티티 추가, 테스트 12건 전부 통과 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- [보안] resetPassword() 후 RefreshToken 삭제 추가 — 비밀번호 변경 시 기존 세션 무효화 - [버그] FindEmailResponse.isNowVerified 수정 — VerificationResult(wasJustVerified) 도입으로 이미 인증된 사용자와 이번에 새로 인증된 사용자를 정확히 구분 - [성능] PortOneApiClient 추출 — OkHttpClient 싱글턴화 및 IdentityVerificationService, PortOneVerificationStrategy 간 중복 HTTP 코드 통합 - [안정성] 외부 I/O 트랜잭션 분리 — PortOne HTTP 호출과 SMTP 발송을 DB 트랜잭션 밖으로 분리해 커넥션 점유 시간 최소화 (TransactionTemplate 사용) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PortOneApiClient 분리에 따라 PortOneApiClient MockBean 추가 - findMember() → findMemberByCert(CertificationInfo) 시그니처 변경 반영 - VerificationResult(wasJustVerified) 도입으로 isNowVerified 검증 케이스 추가 - 비밀번호 재설정 후 RT 삭제 검증 테스트 추가 - test application.yml에 spring.mail.host 더미 설정 추가 (EmailService 추가로 JavaMailSender 빈 생성 필요) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 섹션 14: GET /api/users/check-nickname — 사용 가능/불가 메시지 즉시 표시 - 섹션 15: 아이디 찾기 (본인인증) — PortOne 팝업 + impUid 직접 입력 모두 지원 - 섹션 15: 비밀번호 재설정 (이메일 경로) — 메일 발송 → 토큰 붙여넣기 → 재설정 - 섹션 15: 비밀번호 재설정 (본인인증 경로) — PortOne 팝업 → 토큰 자동 입력 → 재설정 - 비밀번호 재설정 성공 시 기존 토큰 자동 초기화 + 재로그인 안내 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gmail 앱 비밀번호 발급 절차, 환경변수 설정, test.html 섹션별 테스트 순서, 에러코드 대응표, PortOne 테스트 환경 주의사항 포함. 집 등 다른 환경에서 이어서 테스트할 때 참고용. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
아이디 찾기 및 비밀번호 재설정 기능을 구현했습니다.
본인인증(PortOne)과 이메일(Gmail SMTP) 두 채널을 병행하여 확장성을 확보했습니다.
대상 사용자
이메일+비밀번호로 가입한 로컬 계정 사용자 (소셜 로그인 전용 계정 제외)
신규 API
/auth/find-email/auth/password-reset/by-verification/auth/password-reset/by-email/auth/password-reset주요 구현 내용
아이디 찾기 플로우
비밀번호 찾기 플로우
설계 결정
PortOneVerificationStrategy,EmailVerificationStrategy) — 향후 인증 수단 추가 시 기존 코드 변경 없이 확장 가능updateIdentityVerification정책과 일관성 유지)변경 사항
신규 파일
PasswordResetToken엔티티 및 레포지토리FindAccountService,EmailServicePortOneVerificationStrategy,EmailVerificationStrategyFindAccountController+ 요청/응답 DTO 4종기존 파일 수정
MemberRepository— CI 조회, 이름+생년월일 조회 메서드 추가ErrorCode— Auth-001~005 추가SecurityConfig— 신규 4개 엔드포인트 인증 없이 허용build.gradle—spring-boot-starter-mail추가application.yml— Gmail SMTP 설정 추가환경 변수 추가 필요
테스트
🤖 Generated with Claude Code