Skip to content

Conversation

@chanrhan
Copy link
Collaborator

📌 ISSUE 번호

📄 작업 내용 요약

  • 카카오 로그인 로직 추가
  • JWT 인증 로직 추가

카카오 로그인

  1. 클라이언트에서 카카오 인증 URL 호출하여 카카오 인증 모달창 화면에 표시
  2. 클라이언트가 카카오 동의 항목을 체크한 뒤 "완료"를 누르면, 리다이렉트 URL인 /api/v1/users/login/kakao 엔드포인트 호출
  3. 카카오 인가 코드를 바탕으로 카카오 API AccessToken을 발급
  4. 발급받은 카카오 API 용 AccessToken을 통해 인가된 사용자의 정보 불러오기
  5. 사용자 email 을 기반으로 DB에 이미 등록된 사용자인지 판별
    6 (등록되지 않은 경우) 사용자의 email을 바탕으로 사용자를 DB에 등록
  6. 사용자 정보를 바탕으로 AccessToken 생성
  7. AccessToken이 fragement로 포함된 리다이렉트 URL을 반환하여 클라이언트에게 응답

JWT 인증

  • refreshToken을 사용하지 않는 대신 accessToken의 유효 시간을 길게 설정
  • ArgumentResolver를 사용하여 accessToken 검증과 사용자 Id 를 가져오도록 함

📢 참고 사항

✅ 체크리스트

  • ISSUE 번호 연결 했나요?
  • Reviewers 지정 했나요?
  • Assignees 지정 했나요?
  • Labels 지정 했나요?

chanrhan added 16 commits November 15, 2025 10:02
# Conflicts:
#	build.gradle
#	src/main/java/kr/kro/photoliner/domain/user/model/User.java
#	src/main/java/kr/kro/photoliner/domain/user/repository/UserRepository.java
# Conflicts:
#	build.gradle
#	src/main/java/kr/kro/photoliner/domain/album/controller/AlbumController.java
#	src/main/java/kr/kro/photoliner/domain/photo/controller/PhotoController.java
#	src/main/java/kr/kro/photoliner/domain/photo/service/PhotoService.java
#	src/main/resources/application-local-example.yml
@chanrhan chanrhan self-assigned this Nov 23, 2025
@chanrhan chanrhan added the enhancement New feature or request label Nov 23, 2025
@chanrhan chanrhan requested a review from kih1015 November 23, 2025 11:18
Comment on lines +34 to +35
@Value("${jwt.secret-key}") String secretKey,
@Value("${jwt.access-token.expiration-time}") Long accessTokenExpirationTime
Copy link
Contributor

Choose a reason for hiding this comment

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

application-dev.yml 파일에 설정해야합니다!

Comment on lines +66 to +67
// WebClient
implementation 'org.springframework.boot:spring-boot-starter-webflux'
Copy link
Contributor

Choose a reason for hiding this comment

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

RestClient 대안도 존재하는데 무거운 웹플럭스 사용하신 이유가 궁금합니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

찾아보니 webflux는 스프링부트 개발환경에 적합하지 않다고 나오네요..
추후 시간이 된다면 RestClient 로 변경해 보겠습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

webflux, RestClient 각 기술이 가진 장단점을 비교분석 후 선택했으면 더 좋지 않았을까 싶네요👍

@chanrhan chanrhan merged commit 09e175e into develop Nov 23, 2025
1 check passed
@chanrhan chanrhan deleted the feature/login-kakao branch November 23, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 카카오톡 로그인 구현

3 participants