Repository navigation
[FEATURE] 회원 탈퇴 API 연동 #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a889ea0
feat: 회원 탈퇴 API 연동
kbh0218 5bfdd82
fix: 회원 탈퇴 완료 알림 이동 흐름 개선
kbh0218 f89ec2c
refactor: 로그인 라우트 타입 안정성 개선
kbh0218 ccc57f6
fix: 로그인 알림 표시 타이밍 개선
kbh0218 9515d67
fix: 최종 401 로그인 성공 처리 제거
kbh0218 9ff48d2
refactor: delay 함수를 컴포넌트 외부로 이동
kbh0218 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { | ||
| authenticatedApiRequest, | ||
| type ClerkTokenGetter, | ||
| } from '@/api/api-client'; | ||
|
|
||
| export function withdrawMember(getToken: ClerkTokenGetter) { | ||
| return authenticatedApiRequest<void>(getToken, '/api/v1/members/me', { | ||
| method: 'DELETE', | ||
| }); | ||
| } |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
재시도 로직에서 마지막 401도 성공 처리
현재 코드:
3번 재시도 후에도 401이면 member 동기화 실패 상태로 홈 화면 이동합니다.
탈퇴 후 재가입 케이스를 의도한 것으로 보이는데, 이 케이스가 정말 의도된 동작인지 확인 부탁드립니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다! 해당 분기는 제가 테스트 중 계정 탈퇴 후 같은 계정으로 바로 재로그인했을 때
/auth/me에서 401이 발생해, 사용자가 로그인을 두 번 시도해야 하는 불편함을 줄이기 위해 추가했던 처리였습니다.다만 현재는
syncAuthenticatedMemberAfterSso()내부에서 401에 대해 3번 재시도하도록 보완되어 있으므로, 재시도 이후에도 계속 401이 발생한다면 더 이상 성공 로그인으로 간주하기 어렵다고 판단했습니다.따라서 최종 401을 성공처럼 처리하던 분기는 제거했습니다.
이제 401은 재시도 대상까지만 허용하고, 마지막까지 실패하면 기존 로그인 실패 흐름으로 처리됩니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
계정 탈퇴 이후 바로 재로그인을 시도 하면 애초에 막아야 한다고 생각이 됩니다.
물론 이부분은 회의를 통해서 30일 이전 복구 정책에 대해서 논의를 해봐야 하지만
탈퇴 이후 해당 계정으로 로그인을 하지 못하거나 복구 페이지로 가는 등의 결정이 필요해 보입니다.