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

fix : 소셜 로그인시 uuid 길이 수정(5자) #201

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,10 @@ public TokenDto loginWithKakao(KakaoTokenDto kakaoTokenDto) throws IOException {
//DB에 해당 이메일 없을 경우 회원 가입 로직 실행
if (!memberRepository.existsByEmail(email)) {

String uuid = UUID.randomUUID().toString().substring(0, 7);
String randomNickName = "user_" + uuid;
String randomNickName = UUID.randomUUID().toString().substring(0, 5);

while (memberRepository.existsByNickname(randomNickName)) {
uuid = UUID.randomUUID().toString().substring(0, 7);
randomNickName = "user_" + uuid;
randomNickName = UUID.randomUUID().toString().substring(0, 5);
}

Member member = Member.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ public TokenDto loginWithNaver(NaverTokenDto naverTokenDto) throws IOException {
//DB에 해당 이메일 없을 경우 회원 가입 로직 실행
if (!memberRepository.existsByEmail(email)) {

String uuid = UUID.randomUUID().toString().substring(0, 7);
String randomNickName = "user_" + uuid;
String randomNickName = UUID.randomUUID().toString().substring(0, 5);

while (memberRepository.existsByNickname(randomNickName)) {
uuid = UUID.randomUUID().toString().substring(0, 7);
randomNickName = "user_" + uuid;
randomNickName = UUID.randomUUID().toString().substring(0, 5);
}

Member member = Member.builder()
Expand Down