Skip to content

Commit

Permalink
fix: 콜백 URI 경로 오류 시 오류 코드 반환으로 클라이언트 측에서 처리할 수 있도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
popopy0412 committed Sep 20, 2024
1 parent e867b66 commit a0462d4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ public ResponseEntity<?> handleAppleOAuthCallback(Map<String, Object> params, Ht
}
// Apple OAuth 서비스로부터 액세스 토큰을 가져옴
Map<String, String> tokenResponse = getTokens(params, response);
if (tokenResponse.containsKey("error")) {
String error = tokenResponse.get("error");
String redirectUrl = builder.queryParam("error", error).build().toUriString();
HttpHeaders headers = new HttpHeaders();
headers.add("Location", redirectUrl);
return new ResponseEntity<>(headers, HttpStatus.SEE_OTHER);
}
String accessToken = tokenResponse.get("access_token");
String refreshToken = tokenResponse.get("refresh_token");

Expand Down

0 comments on commit a0462d4

Please sign in to comment.