Skip to content

Commit 74f9e0d

Browse files
committed
fix: ๐Ÿ› ๊ฐ‘์ž๊ธฐ ์• ํ”Œ์†Œ์…œ๋กœ๊ทธ์ธ์ด ์•ˆ๋จ.... getStringClaim -> getClaim์œผ๋กœ ๋ณ€๊ฒฝํ›„ ํ•ด๊ฒฐ
1 parent ab62bb0 commit 74f9e0d

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

โ€Žsrc/main/java/org/runnect/server/auth/service/AppleSignInService.javaโ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ public SocialInfoResponseDto getSocialInfo(String idToken) {
7878
}
7979

8080

81-
// ๋ฐœ๊ธ‰์ฒ˜, aud,์ด๋ฉ”์ผ ๊ฒ€์ฆ ์‹คํŒจ์‹œ
81+
82+
Boolean emailVerified = (Boolean) claimsSet.getClaim("email_verified");
8283
if (!claimsSet.getIssuer().equals(APPLE_ISSUE_URL) ||
8384
!claimsSet.getAudience().get(0).equals(APPLE_BUNDLE_ID) ||
84-
!Boolean.parseBoolean(claimsSet.getStringClaim("email_verified"))) {
85+
emailVerified == null || !emailVerified) {
8586
throw new UnauthorizedException(ErrorStatus.INVALID_APPLE_ID_TOKEN_EXCEPTION,
8687
ErrorStatus.INVALID_APPLE_ID_TOKEN_EXCEPTION.getMessage());
8788

โ€Žsrc/main/java/org/runnect/server/auth/service/AuthService.javaโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public GetNewTokenResponseDto getNewToken(String accessToken, String refreshToke
7979
public AuthResponseDto signIn(SignInRequestDto signInRequestDto) {
8080
SocialType socialType = SocialType.valueOf(signInRequestDto.getProvider());
8181

82+
System.out.println("ํƒ€์ž…์€? "+ socialType);
83+
8284
SocialInfoResponseDto socialInfo = getSocialInfo(socialType, signInRequestDto.getToken());
8385

8486
boolean isRegistered = userRepository.existsByEmailAndProvider(socialInfo.getEmail(), socialType);

0 commit comments

Comments
ย (0)