Skip to content

Commit

Permalink
Merge pull request #633 from woowacourse-teams/refactor/#632
Browse files Browse the repository at this point in the history
멤버 실명이 null 일 경우 검증
  • Loading branch information
hoyeonyy authored Oct 13, 2024
2 parents 45be4e7 + 000e307 commit 89e380d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ public String getMemberName(String idToken) {
GoogleIdToken googleIdToken = getGoogleIdToken(idToken);
String familyName = (String)googleIdToken.getPayload().get("family_name");
String givenName = (String)googleIdToken.getPayload().get("given_name");
return getFullName(familyName, givenName);
}

private String getFullName(String familyName, String givenName) {
if (familyName == null) {
familyName = "";
}
if (givenName == null) {
givenName = "";
}
return familyName + givenName;
}

Expand Down

0 comments on commit 89e380d

Please sign in to comment.