Skip to content

[FIX] 이메일 중복 허용#119

Merged
david-parkk merged 19 commits into
developfrom
KAN-51-fix/email
Jun 28, 2025
Merged

[FIX] 이메일 중복 허용#119
david-parkk merged 19 commits into
developfrom
KAN-51-fix/email

Conversation

@You-Hyuk
Copy link
Copy Markdown
Contributor

✏️ 작업 개요

⛳ 작업 분류

  • 작업1 SignInType 값 JWT Claim 추가
  • 작업2 UserService 유저 조회 로직 변경 및 리팩토링
  • 작업3 테스트 추가

🔨 작업 상세 내용

  1. JWT Claim에 유저의 SignInType 값을 넣음으로써 토큰으로 유저를 조회하는 방식에 문제가 없도록 하였습니다.
  2. 기존의 CustomUserDetailsService의 경우 UserDetailsService 인터페이스를 구현하여 사용하였는데, loadUserByUsername 메소드를 오버라이드 하는 경우 파라미터가 userName뿐으로, 각기 다른 SignInType을 반영하기 어렵다고 느껴 변경하게 되었습니다.

💡 생각해볼 문제

  • X

@github-actions
Copy link
Copy Markdown

Test Results

42 tests   42 ✅  1m 9s ⏱️
10 suites   0 💤
10 files     0 ❌

Results for commit 8a3b54c.

Copy link
Copy Markdown
Member

@david-parkk david-parkk left a comment

Choose a reason for hiding this comment

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

LGTM!

public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {

User user= userRepository.findByEmail(email).
public UserDetails loadUserByEmailAndSignInType(String email, SignInType signInType) throws UsernameNotFoundException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SignInType을 받게되는 경우 동일한 이메일에 대해서 중복 회원가입을 허용한다고 이해했는데 맞을까요

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

테스트 코드로 답변되는 내용이 였네요 확인했습니다

@david-parkk david-parkk merged commit 049df9f into develop Jun 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[KAN-51] 이메일 중복 로직 수정

2 participants