feat : 회원 탈퇴 API 구현 (DB/Redis/Firebase 삭제) #22#32
Merged
Hidden character warning
The head ref may contain hidden characters: "20260422_#22_\ud68c\uc6d0_\ud0c8\ud1f4_API_\uad6c\ud604"
Conversation
…terObject, 응답 예시) #22
🗑️ Preview 환경 삭제 완료!
다시 배포하려면: 🤖 이 댓글은 PR/Issue Preview 시스템에 의해 자동 생성되었습니다. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (29)
워크스루이 PR은 SpaceStudyShip 백엔드에 회원 탈퇴 API를 구현하며, Firebase 사용자 삭제 통합, 에러 응답 리팩토링, Swagger 문서화 확대, AI 어시스턴트 커맨드 파일 표준화를 포함한다. 변경 사항회원 탈퇴 API 구현
AI 어시스턴트 커맨드 파일 표준화
추정 코드 리뷰 노력🎯 3 (중간 복잡도) | ⏱️ ~25분 ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat : 회원 탈퇴 API 구현 (DB/Redis/Firebase 삭제) #22
Summary
DELETE /api/auth/withdraw엔드포인트를 추가해 인증된 사용자의 DB row, Redis refresh token, Firebase Authentication 사용자를 모두 삭제한다. 외부 시스템(Redis/Firebase) 장애가 DB 롤백을 일으키지 않도록 예외를 격리하고 멱등성을 보장한다.Changes
SS-Auth/build.gradle: Firebase Admin SDK9.4.3의존성 추가SS-Auth/.../auth/firebase/FirebaseConfig.java: 신규 —FirebaseApp초기화 +FirebaseAuth빈 노출SS-Auth/.../auth/service/AuthService.java:withdraw(Long memberId)메서드 + privatedeleteFirebaseUserSafely()헬퍼 추가 (DB → Redis → Firebase 순 삭제, Firebase 예외는 모두 로그 처리)SS-Web/.../controller/auth/AuthController.java:DELETE /api/auth/withdraw엔드포인트 추가, 전체 Auth 엔드포인트 Swagger 문서(@Operationdescription/응답 예시) 상세화SS-Auth/.../auth/interceptor/AuthMember.java:@Parameter(hidden = true)추가로 Swagger 파라미터 노출 제거SS-Common/.../exception/ErrorResponse.java,GlobalExceptionHandler.java: 응답 본문을 API 스펙에 맞게{code, message}형식으로 변경SS-Web/src/main/resources/application.yml:firebase.admin-sdk-path설정 추가.gitignore: Firebase Admin SDK 키 파일 패턴(**/firebase/*.json,*-firebase-adminsdk-*.json) 추가SS-Auth/.../AuthServiceTest.java(+4 케이스),SS-Web/.../AuthControllerTest.java(+2 케이스): TDD 기반 테스트 추가docs/superpowers/specs/2026-05-11-withdraw-api-design.md,docs/superpowers/plans/2026-05-11-withdraw-api.md: 설계·구현 계획 문서 추가Behavior Change
DELETE /api/auth/withdraw→204 No Content401 UnauthorizedUSER_NOT_FOUND204(warn 로그)204(error 로그) — DB 트랜잭션 롤백 안 됨ErrorResponse형식{ "code": "...", "message": "..." }@AuthMemberSwagger 노출@Parameter(hidden = true)로 숨김Test Plan
./gradlew test전체 통과 (25/25)AuthServiceTest.withdraw_*4개 케이스 통과 (정상 / 멱등 / Firebase USER_NOT_FOUND / Firebase 일반 오류)AuthControllerTest.withdraw_*2개 케이스 통과 (정상 204 / 인증 누락 401)./gradlew clean build전체 통과 확인bootRun --args='--spring.profiles.active=dev') 후 로그에[FirebaseConfig] FirebaseApp 초기화 완료출력 확인/docs/swagger)에서DELETE /api/auth/withdraw노출 및@AuthMember파라미터 미노출 확인curl -i -X DELETE http://localhost:8080/api/auth/withdraw→ 401 응답 확인Notes
spacestudyship-firebase-adminsdk-fbsvc-7e86c5c253.json)은.gitignore에 등록되어 추적되지 않는다. 로컬·CI 환경에서는SS-Web/src/main/resources/firebase/경로에 별도 배치 필요.application.yml의firebase.admin-sdk-path는classpath:prefix를 사용 — SpringResource타입이 자동 리졸션.docs/superpowers/specs/2026-05-11-withdraw-api-design.mddocs/superpowers/plans/2026-05-11-withdraw-api.mdErrorResponse형식 변경은 본 PR 범위(withdraw401/500 예시 정합성 확보)에서 함께 처리. 기존 다른 엔드포인트 응답 본문도 같은 형식으로 전환됨 — 클라이언트 측 파싱 확인 필요..pr/디렉토리는 현재.gitignore에 등록되어 있지 않다. 본 파일은 PR 본문 초안 용도이며, 커밋 대상은 아님 — 필요 시.gitignore에.pr/추가 권장.Closes #22
Summary by CodeRabbit
주요 변경사항
New Features
DELETE /api/auth/withdraw엔드포인트를 통해 인증된 사용자가 계정을 완전히 삭제할 수 있습니다.Documentation
Chores