-
Notifications
You must be signed in to change notification settings - Fork 3
Fix: 401에러 토큰 갱신 로직 apiClient hook에도 추가 #544
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
9 commits
Select commit
Hold shift + click to select a range
aba2cd7
(#541) refactor: 401에러 토큰 갱신 로직 apiClient hook에도 추가
sgoldenbird 648da98
(#541) feat: test를 위해 리프레시 토큰 만료기간 20초로 변경
sgoldenbird 680df12
(#541) refactor: 프로필 이미지 변경시 헤더에 바로 반영되던 문제 수정
sgoldenbird 30655a1
(#541) fix: url 쿼리파라미터를 감지해 유저정보 초기화
sgoldenbird 7049cb8
(#541) fix: 401발생 시 전역상태 초기화, 메인페이지로 리디렉션(beforeErrorHook)
sgoldenbird 04e88b0
Merge branch 'main' into feat/541/mypage-header-image-preview
sgoldenbird 628d8ea
(#541) fix: suspense로 감싸기
sgoldenbird 908cfdd
Merge branch 'feat/541/mypage-header-image-preview' of https://github…
sgoldenbird 875e531
(#541) fix: useProfileImageMutation 원상복구
sgoldenbird 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,29 @@ | ||
| 'use client'; | ||
|
|
||
| import { Suspense } from 'react'; | ||
|
|
||
| import Nothing from '@/shared/components/ui/nothing'; | ||
|
|
||
| export default function NothingTestPage() { | ||
| return ( | ||
| <div className='flex h-screen w-full content-start items-center justify-center gap-100'> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='reservation' /> | ||
| <span className='font-size-16 text-gray-700'>type: reservation</span> | ||
| <p className='font-size-13'> | ||
| 버튼 클릭시 /activities 페이지로 이동합니다. | ||
| </p> | ||
| </div> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='activity' /> | ||
| <span className='font-size-16 text-gray-700'>type: activity</span> | ||
| </div> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='review' /> | ||
| <span className='font-size-16 text-gray-700'>type: review</span> | ||
| <Suspense fallback={null}> | ||
| <div className='flex h-screen w-full content-start items-center justify-center gap-100'> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='reservation' /> | ||
| <span className='font-size-16 text-gray-700'>type: reservation</span> | ||
| <p className='font-size-13'> | ||
| 버튼 클릭시 /activities 페이지로 이동합니다. | ||
| </p> | ||
| </div> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='activity' /> | ||
| <span className='font-size-16 text-gray-700'>type: activity</span> | ||
| </div> | ||
| <div className='flex flex-col items-center gap-20'> | ||
| <Nothing type='review' /> | ||
| <span className='font-size-16 text-gray-700'>type: review</span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </Suspense> | ||
| ); | ||
| } |
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
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.
💡 Verification agent
🧩 Analysis chain
세션 만료 처리 로직을 검증해 주세요.
구현 로직은 올바르게 작성되었지만, 다음 사항들을 확인해 주세요:
ERROR_CODES.SESSION_EXPIRED상수값이 실제 미들웨어나 API 응답에서 사용하는 값과 일치하는지clearUser()함수가 모든 필요한 사용자 상태를 완전히 초기화하는지다음 스크립트를 실행하여 ERROR_CODES 상수와 clearUser 함수의 구현을 확인해 주세요:
🏁 Script executed:
Length of output: 16835
다음 스크립트를 실행하여
clearUser함수의 정의 위치와 구현 내용을 확인해 주세요.🏁 Script executed:
Length of output: 257
다음과 같이 전 범위에서
clearUser정의를 찾는 스크립트를 실행해주세요.위 결과를 통해
clearUser가 선언된 파일과 구현 내용을 확인한 뒤 다시 공유해주세요.🏁 Script executed:
Length of output: 6961
세션 만료 처리 로직 검증 및 추가 캐시 초기화 제안
ERROR_CODES.SESSION_EXPIRED
'session_expired'이 formatErrorResponseHooks, 테스트 페이지 등에서 일관되게 사용되고 있어 매칭에 문제 없습니다.clearUser() 동작 확인
user: null만 설정하도록 구현되어 있습니다.queryClient.removeQueries(['user', 'me'])또는queryClient.clear()등을 통해 추가 초기화를 고려해주세요.기타 에러 코드 검토
– 검사 대상
clearUser()호출부)🤖 Prompt for AI Agents