Skip to content

Commit

Permalink
fix: protect login duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
thguss committed Jul 9, 2024
1 parent 0e210da commit dce7a9e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public SignInResponse signIn(String socialAccessToken, SignInRequest request) {
}

private Member signIn(Member.Social social, SignInRequest request) {
return memberPort.findBySocial(social).orElse(memberPort.save(request.toDomain(social.socialId())));
return memberPort.findBySocial(social)
.orElseGet(() -> memberPort.save(request.toDomain(social.socialId())));
}

@Transactional
Expand Down

0 comments on commit dce7a9e

Please sign in to comment.