From d55f31edcfddb8ddb06416acb24578aa6e7d428e Mon Sep 17 00:00:00 2001 From: rlarltj123 Date: Sun, 12 May 2024 18:32:24 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20apple=20revoke=20url=EB=A5=BC=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=ED=95=9C=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneymong/global/security/oauth/handler/AppleService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moneymong/global/security/oauth/handler/AppleService.java b/src/main/java/com/moneymong/global/security/oauth/handler/AppleService.java index 7250a7f..dfacfea 100644 --- a/src/main/java/com/moneymong/global/security/oauth/handler/AppleService.java +++ b/src/main/java/com/moneymong/global/security/oauth/handler/AppleService.java @@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.*; import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; @@ -125,7 +126,7 @@ public void unlink(Long userId) { params.add("token_type_hint", "refresh_token"); URI uri = UriComponentsBuilder - .fromUriString(host + "/auth/oauth2/v2/revoke") + .fromUriString(host + "/auth/revoke") .build() .toUri(); @@ -136,6 +137,7 @@ public void unlink(Long userId) { try { restTemplate.postForEntity(uri, httpEntity, AppleUserData.class); + appleUserRepository.delete(appleUser); } catch (RestClientException e) { throw new HttpClientException(ErrorCode.HTTP_CLIENT_REQUEST_FAILED); }