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); }