-
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
Nabi 41 yejin refactor kakao login user #21
Conversation
User user = optionalUser.orElseGet(() -> { | ||
return userRepository.save(userSignInRequestDTO.toEntity()); | ||
}); |
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.
p1
랜덤닉네임 생성 기능을 위해서 제가 만들어둔 signup메소드를 오버라이딩하는 것이 좋을 것 같습니다. (signup내부적으로 random nickname을 생성해주므로)
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.
return userRepository.save(userSignInRequestDTO.toEntity()); | ||
}); | ||
|
||
TokenDTO tokenDTO = jwtProvider.createTokenDTO(user.getUserId(), user.getRole()); |
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.
p1
TokenDTO클래스는 네이밍이 애매해서, 제가 TokenResponseDTO로 고친 이후 dev에 머지해두었습니다.
PR 날리기 전에 dev브랜치의 커밋을 머지하시는 것이 좋을 것 같아요! (해당 PR머지시 기존 파일들이 덮어씌워짐)
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.
확인했습니다~!
PR 확인 항목
PR 보내기전에 아래 항목들을 만족 하였는지 체크 해주세요
PR 종류
어떤 종류의 PR인지 아래 항목중에 체크 해주세요
어떤 기능이 추가 되었나요?
Issue Number: 41
기존에 있던 기능에 영향을 주나요?
기존 jwt 토큰만 내려주던 방식에서 유저 정보도 내려주도록 수정했습니다 !
실제 운영 환경에서 반환하는 응답 -- 23.11.07(화)
{
"code":"SUCCESS",
"message":"성공하였습니다.",
"userInfo":{
"userId":1,
"accountId":"3136155024",
"nickName":"신예진",
"imageUrl":null,
"role":"ROLE_USER",
"createdDate":"2023-11-07T18:11:01",
"modifiedDate":"2023-11-07T18:11:01"
},
"token": {
"grantType":"Bearer",
"accessToken":"",
"refreshToken":"",
"accessTokenExpireDate":3600000
}
}
기타