회원 탈퇴 화면 (US-04) - #199
Merged
Merged
Conversation
DELETE /api/users/me 는 있었지만 사용자가 도달할 경로가 없었다 — 백엔드만 구현된 상태로 남아 있던 US-04 를 화면까지 잇는다. /workspace/account (계정 설정)에 계정 정보 · 로그아웃 · 회원 탈퇴를 둔다. 탈퇴 안내는 docs/security.md §5.3 이 약속한 처리를 그대로 나열한다. "정말 삭제할까요?" 만 묻고 넘어가면 사용자는 무엇이 사라지는지 모른 채 누르게 된다. 특히 GitHub 앱 승인은 우리가 취소할 수 없으므로 github.com/settings/applications 경로를 함께 안내한다 — 이걸 알려주지 않으면 사용자는 탈퇴했는데도 권한이 남아 있다는 사실 자체를 모른다. useDeleteAccount 는 410(이미 탈퇴)을 실패로 다루지 않는다. 사용자가 원한 결과는 이미 이뤄졌으니(다른 탭에서 먼저 탈퇴) 로그아웃까지 마무리한다. 탈퇴 후 로그아웃 API 는 계정이 사라져 실패할 수 있는데, AuthProvider 의 logout 이 finally 에서 로컬 상태를 정리하므로 화면은 정상 처리된다. #198 로 토큰 폐기가 추가돼 OpenAPI 설명이 낡았기에 함께 갱신하고 프론트 타입을 재생성했다.
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.
왜
#198 을 작업하며 발견한 공백이다.
DELETE /api/users/me는 동작하는데 사용자가 도달할 경로가 없었다 — 프론트에서 '탈퇴' 문자열이 자동 생성 타입에만 존재했다. US-04 가 백엔드만 구현된 상태였다.무엇
/workspace/account(계정 설정) — 사이드바에 항목 추가.안내 문구를 공들인 이유
docs/security.md §5.3이 약속한 처리를 그대로 나열한다.UserDeletionShareRevokeListener)특히 GitHub 앱 승인 해제 경로(
github.com/settings/applications)를 함께 안내한다. 우리가 지우는 건 우리가 가진 사본뿐이고 승인 자체는 사용자만 취소할 수 있다. 이걸 알려주지 않으면 사용자는 탈퇴했는데도 권한이 남아 있다는 사실 자체를 모른다."정말 삭제할까요?" 만 묻고 넘어가는 확인창은 동의를 받은 게 아니라 클릭을 받은 것이다.
엣지 케이스
useDeleteAccount는 410(이미 탈퇴)을 실패로 다루지 않는다. 다른 탭에서 먼저 탈퇴한 경우인데, 사용자가 원한 결과는 이미 이뤄졌으므로 에러 토스트 대신 로그아웃까지 마무리한다.탈퇴 직후 로그아웃 API 는 계정이 사라져 실패할 수 있다.
AuthProvider.logout이finally에서 로컬 상태를 정리하므로 화면은 정상적으로 로그아웃된다 — 이 동작에 의존한다는 걸 훅 주석에 남겼다.테스트
AccountView.test.tsx5 케이스프론트 전체 134 tests / 33 files 통과, 타입체크·빌드 정상.
함께 갱신
UserController의@Operation설명이 탈퇴 시 보관 중이던 GitHub access token 을 폐기 #198 이후 낡아 있어 갱신 (토큰 폐기·공유 토큰 revoke 반영) →backend/openapi.json재생성 →npm run openapi로 프론트 타입 재생성docs/security.md §5.3의 "미구현" 표기를 화면 경로로 교체