Skip to content

Commit

Permalink
chore: name이 null인 경우 임시 닉네임을 기입한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed Jun 10, 2024
1 parent 6d00496 commit fbd80a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public User save(User unsavedUser) {
public User registerUser(OAuthUserInfo oauthUserInfo) {
User newUser = User.of(
oauthUserInfo.getEmail(),
oauthUserInfo.getNickname(),
oauthUserInfo.getNickname() == null ? "tester" : oauthUserInfo.getNickname(),
oauthUserInfo.getProvider(),
oauthUserInfo.getOauthId()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private OAuthUserDataResponse decodePayload(String idToken, String nickname, Str
Map<String, Claim> claims = decoded.getClaims();

String providerUid = decoded.getSubject();
String email = claims.get("sub").asString();
String email = claims.get("email").asString();

return OAuthUserDataResponse.builder()
.provider(getAuthProvider().toString())
Expand Down

0 comments on commit fbd80a4

Please sign in to comment.