Skip to content

Commit

Permalink
Merge pull request #72 from Modagbul/fix/auth
Browse files Browse the repository at this point in the history
fix: 구글 로그인 토큰 검증 오류 해결
  • Loading branch information
minsu20 authored Nov 13, 2023
2 parents 26fd3f2 + 08864e7 commit 6b715b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ public Member getUserData(String accessToken) {
.bodyToMono(GoogleUserResponse.class)
.block();

// googleTokenUserCase.verifyAccessToken(googleUserResponse.getAud());

if (googleUserResponse != null) {
googleTokenUserCase.verifyAccessToken(googleUserResponse.getAud());
googleUserResponse.adaptResponse();
return memberMapper.createGoogleMember(googleUserResponse);
}
return null;
throw new TokenInvalidException();
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GoogleTokenUserCase {
public void verifyAccessToken(String aud) {
String extractedAppId = Arrays.stream(aud.split("-"))
.findFirst()
.orElseThrow(() -> new TokenInvalidException());
.orElseThrow(TokenInvalidException::new);

if (!appId.equals(extractedAppId)) throw new AppIdInvalidException();
}
Expand Down

0 comments on commit 6b715b8

Please sign in to comment.