diff --git a/src/main/java/com/dnd/runus/application/oauth/OauthService.java b/src/main/java/com/dnd/runus/application/oauth/OauthService.java
index 83afcf2c..182ac0cb 100644
--- a/src/main/java/com/dnd/runus/application/oauth/OauthService.java
+++ b/src/main/java/com/dnd/runus/application/oauth/OauthService.java
@@ -117,6 +117,7 @@ private SocialProfile createMember(String oauthId, String email, SocialType soci
private void deleteMember(long memberId) {
badgeAchievementRepository.deleteByMemberId(memberId);
+ // todo 챌린지 삭제(챌린지 기능 구현 완료 후)
runningRecordRepository.deleteByMemberId(memberId);
memberLevelRepository.deleteByMemberId(memberId);
socialProfileRepository.deleteByMemberId(memberId);
diff --git a/src/main/java/com/dnd/runus/auth/oidc/provider/OidcProvider.java b/src/main/java/com/dnd/runus/auth/oidc/provider/OidcProvider.java
index 80076c56..cc53a093 100644
--- a/src/main/java/com/dnd/runus/auth/oidc/provider/OidcProvider.java
+++ b/src/main/java/com/dnd/runus/auth/oidc/provider/OidcProvider.java
@@ -20,7 +20,7 @@ public interface OidcProvider {
String getAccessToken(String code);
/**
- *
+ * 소셜로그인 연결 해제
* @param accessToken 엑세스토큰
*/
void revoke(String accessToken);
diff --git a/src/main/java/com/dnd/runus/presentation/v1/oauth/OauthController.java b/src/main/java/com/dnd/runus/presentation/v1/oauth/OauthController.java
index d4b21ecf..6b951758 100644
--- a/src/main/java/com/dnd/runus/presentation/v1/oauth/OauthController.java
+++ b/src/main/java/com/dnd/runus/presentation/v1/oauth/OauthController.java
@@ -8,13 +8,17 @@
import com.dnd.runus.presentation.v1.oauth.dto.request.WithdrawRequest;
import com.dnd.runus.presentation.v1.oauth.dto.response.TokenResponse;
import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+@Tag(name = "OAuth")
@RequestMapping("/api/v1/auth/oauth")
@RestController
@RequiredArgsConstructor
@@ -29,11 +33,26 @@ public class OauthController {
@ApiErrorType({ErrorType.UNSUPPORTED_SOCIAL_TYPE, ErrorType.MALFORMED_ACCESS_TOKEN, ErrorType.UNSUPPORTED_JWT_TOKEN
})
@PostMapping
+ @ResponseStatus(HttpStatus.OK)
public TokenResponse signIn(@Valid @RequestBody OauthRequest request) {
return oauthService.signIn(request);
}
+ @Operation(
+ summary = "회원 탈퇴",
+ description =
+ """
+ ## 회원 탈퇴 API입니다.
+ idToken과 authorizationCode로 애플에서 토큰을 발급합니다.
+ 발급 받은 토큰으로 사용자의 서비스 해제 요청을 합니다.
+ 사용자의 모든 데이터를 삭제합니다.
+ """)
+ @ApiErrorType({
+ ErrorType.UNSUPPORTED_SOCIAL_TYPE,
+ ErrorType.FAILED_AUTHENTICATION,
+ })
@PostMapping("/withdraw")
+ @ResponseStatus(HttpStatus.OK)
public void withdraw(@MemberId long memberId, @Valid @RequestBody WithdrawRequest request) {
oauthService.withdraw(memberId, request);
}
diff --git a/src/main/java/com/dnd/runus/presentation/v1/oauth/dto/request/WithdrawRequest.java b/src/main/java/com/dnd/runus/presentation/v1/oauth/dto/request/WithdrawRequest.java
index f15422a4..6fffdd15 100644
--- a/src/main/java/com/dnd/runus/presentation/v1/oauth/dto/request/WithdrawRequest.java
+++ b/src/main/java/com/dnd/runus/presentation/v1/oauth/dto/request/WithdrawRequest.java
@@ -10,7 +10,6 @@ public record WithdrawRequest(
@Schema(description = "소셜 로그인 타입")
@NotNull
SocialType socialType,
- @Schema(description = "authorizationCode")
@NotBlank
String authorizationCode,
@NotBlank