-
Notifications
You must be signed in to change notification settings - Fork 1
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] oauth2 로그인 기능 추가 (구글,네이버,카카오) #37
Conversation
PrincipalOauth2UserService 클래스 추가
OAuth2LoginSuccessHandler 추가
SecurityConfig에 Oauth2 설정값 추가
OAuth2UserInfo 추가
GoogleUserInfo 추가
NaverUserInfo 추가
KaKaoUserInfo 추가
yml파일들에 oauth2 설정 추가
findByMemberBaseEmailAndProvider 추가
MemberEntity 수정 updateProfileImage 추가 Member Builder에서 provider 설정 가능
get OAuth2/info api 추가
oauth2 로그인 http 파일 추가
test application.yml에 설정값 추가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어려운 코드였을텐데 코드를 잘 짜신것 같습니다.
고생하셨습니다 (따봉)
|
||
@GetMapping("/oauth2/info") | ||
public ResponseEntity<ResponseDTO<LoginResponseDto>> oauth2Test( | ||
@RequestParam String token, @RequestParam String email, @RequestParam String name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가독성을 위해 한 칸 내린 매개변수들은 한 번의 탭을 추가하는 건 어떨까요? 바로 밑 코드들과 같은 라인이라 구분이 되면 좋을듯 합니다.
예를 들어,
@GetMapping("/test/jwt")
public ResponseEntity<ResponseDTO<TestUserResponseDto>> test(
@AuthenticationPrincipal PrincipalDetails principalDetails) {
Member member = principalDetails.getMember();
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctrl alt l로 google code java convetion에 맞춰 적용할 경우 자동으로 다시 수정되는 부분입니다.
google code java convetion을 사용하고 있기 때문에 이대로 하는게 맞는거같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예전 커밋이지만 지금 발견해서 말씀드립니다.
32번째 줄을 보면 메소드명은 signup인데, Dto명에선 signUp으로 되어 있어요.
일반적으로 사용하는 signUp으로 통일하면 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 이부분 반영하겠습니다 실수한거같네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memberBase 필드를 protected로 한 이유가 있나요? private으로 해도 되지 않나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private 보다 더 넓은 범위에서 쓰기 위해 protected가 맞는거 같습니다.
@@ -7,5 +7,6 @@ | |||
public interface MemberRepository extends JpaRepository<Member, Long> { | |||
|
|||
Optional<Member> findByMemberBaseEmail(String email); | |||
Optional<Member> findByMemberBaseEmailAndProvider(String email,String provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
매개변수 사이에 한 칸 띄어쓰기하면 좋을듯 합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google code java convetion을 적용하지 않았네요 반영해서 수정했습니다
code convention 적용하지 않은 부분 적용
🎯 목적
🛠 작성/변경 사항
🔗 관련 이슈