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

Hotfix/#123/로그인 성공시 userid return #124

Merged
merged 3 commits into from
Aug 18, 2024

Conversation

seongjunnoh
Copy link
Collaborator

📝 요약

로컬 로그인, 소셜 로그인 시 response로 success msg 대신 userId 값을 보내주도록 수정

이슈 번호 : #123

🔖 변경 사항

✅ 리뷰 요구사항

📸 확인 방법 (선택)



📌 PR 진행 시 이러한 점들을 참고해 주세요

* P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
* P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
* P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)

@seongjunnoh seongjunnoh linked an issue Aug 18, 2024 that may be closed by this pull request
@@ -70,6 +70,6 @@ public BaseResponse<String> kakaoCallback(@RequestParam(name = "code") String co
response.setHeader("Authorization", "Bearer " + jwtOAuthLogin);
log.info("jwtOAuthLogin = {}", jwtOAuthLogin);

return new BaseResponse<>("카카오 로그인 성공");
return new BaseResponse<>(userByOAuthInfo.getUserId());
Copy link
Member

Choose a reason for hiding this comment

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

p3: 그럼 "result": 1 이런 형식으로 가는 건가요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵! dto를 생성할까 했는데 그냥 바로 userId 값을 넘겨도 괜찮지 않을까 해서 이렇게 코드를 구성했습니다
혹시 response dto를 구성하는게 더 나을까요??

Copy link
Collaborator

Choose a reason for hiding this comment

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

정확히 어떤 값인지 알기 위해서 명시해주는 것도 좋다고 생각합니다.
"userId : 1 이런 식으로요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

리뷰 내용 반영해서 response dto 생성해서 userId를 전달하는 방식으로 추가 커밋 하였습니다!

@@ -70,6 +70,6 @@ public BaseResponse<String> kakaoCallback(@RequestParam(name = "code") String co
response.setHeader("Authorization", "Bearer " + jwtOAuthLogin);
log.info("jwtOAuthLogin = {}", jwtOAuthLogin);

return new BaseResponse<>("카카오 로그인 성공");
return new BaseResponse<>(userByOAuthInfo.getUserId());
Copy link
Collaborator

Choose a reason for hiding this comment

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

정확히 어떤 값인지 알기 위해서 명시해주는 것도 좋다고 생각합니다.
"userId : 1 이런 식으로요!

@seongjunnoh seongjunnoh merged commit d88f709 into develop Aug 18, 2024
3 checks passed
@hyunn522 hyunn522 deleted the hotfix/#123/로그인-성공시-userid-return branch August 18, 2024 17:31
seongjunnoh added a commit that referenced this pull request Oct 30, 2024
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.

Hotfix : 로그인 성공시 userId return
3 participants