Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Feat] 카카오 소셜 로그인 구현 #77

Merged
merged 32 commits into from
May 10, 2024
Merged

Conversation

88dldl
Copy link
Member

@88dldl 88dldl commented May 9, 2024

📍 PR 타입

  • 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

❗️ 관련 이슈 링크

Close #38

🔁 변경 및 추가사항

로그인/로그아웃/리프레시 토큰 발급 컨트롤러 181316e

커스텀 어노테이션

  • @authuser(인증 정보를 통한 식별자 추출 -> Developer반환) c98d713
  • @ExtractToken (토큰 유효한지 체크) a7680dc

securityConfig 설정 03ae06f
컨트롤러 제네릭 타입 추가 fa19a3a

📚 레퍼런스 (또는 새로 알게 된 내용) 혹은 궁금한 사항들

  • 노션에 로직 정리한 것 올려둘테니 확인 한번씩 해주세요!

✅ 체크 리스트

  • PR 템플릿에 맞추어 작성했어요.
  • 변경 내용에 대한 테스트를 진행했어요.
  • 프로그램이 정상적으로 동작해요.
  • PR에 적절한 라벨을 선택했어요.
  • 불필요한 코드는 삭제했어요.

88dldl added 30 commits April 30, 2024 21:54
…Backend into issue/38-kakao-login

# Conflicts:
#	src/main/java/ssuPlector/controller/DeveloperController.java
…Backend into issue/38-kakao-login

# Conflicts:
#	build.gradle
#	src/main/resources/application.yml
…Backend into issue/38-kakao-login

# Conflicts:
#	src/main/java/ssuPlector/domain/Developer.java
@88dldl 88dldl added ✨ Feat 새로운 기능 추가 ♻️ Refactor 코드 리팩토링 labels May 9, 2024
@88dldl 88dldl self-assigned this May 9, 2024
@88dldl 88dldl linked an issue May 9, 2024 that may be closed by this pull request
1 task
Copy link
Member

@chanmin-00 chanmin-00 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!. 어려운 개념이긴 하지만 노션 계속 참고해서 읽으니까 이해도 잘되고 전반전인 구조를 잘 이해할 수 있었습니다. 구현하시느라 수고하셨어요!

@@ -41,8 +42,7 @@ public ApiResponse<String> kakaoLogout(

@Operation(summary = "토큰 재발급", description = "토큰을 재발급 합니다._숙희")
@PostMapping("/kakao/refresh")
public ApiResponse<TokenRefreshResponse> refresh(
@RequestParam("refreshToken") String refreshToken) {
public ApiResponse<TokenRefreshResponse> refresh(@ExtractToken String refreshToken) {
Copy link
Member

@chanmin-00 chanmin-00 May 10, 2024

Choose a reason for hiding this comment

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

토큰 발급이랑 추출 방식의 차이가 잘 이해가 되지 않는데 어떤 이유로 바꾼 건가요?

Copy link
Member Author

Choose a reason for hiding this comment

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

해당 어노테이션에서는 HTTP 요청 헤더에서 Authorization값을 추출해서 유효한지 체크하고 refreshToken으로 넘기는 과정으로 동작합니다! 그전에는 그냥 리프레시 토큰을 입력받는 형식으로 구성되어있는데, 그것보다 이후의 로직이 좀 더 나은거 같아 수정했습니다 !

Copy link
Contributor

@Ares-10 Ares-10 left a comment

Choose a reason for hiding this comment

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

제가 아직 잘 모르는 부분이라 코드 관련해서 노션에 정리해두신 자료 꼼꼼히 읽어보면서 코드 확인해봤습니다.
스웨거 인터페이스에 �객체 나타내기 위해서 제너릭 명시한 부분 확인했습니다.
UserDetail이랑 토큰 처리 로직, 카카오 인증 로직도 확인했습니다.
새로 접했던 개념들은 pr 리뷰 이후에도 따로 공부 해보도록 하겠습니다.
코드 작성하느라 수고 많으셨습니다~!

@88dldl 88dldl merged commit 28f7cba into develop May 10, 2024
@88dldl 88dldl deleted the issue/38-kakao-login branch May 10, 2024 07:29
@Ares-10
Copy link
Contributor

Ares-10 commented May 11, 2024

resolveArgument 이 부분에서 developerService.getDeveloper(userId) 사용하는데
developerService.getDeveloper(userId) 이게 조회수 카운트도 올리는 함수라
적절한 호출인가요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor 코드 리팩토링 ✨ Feat 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ [Feat] 카카오 로그인 구현
3 participants