Skip to content

Commit

Permalink
fix: 헤더를 찾을 수 없는 경우에도 인증 관련 데이터 제거되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyunbak committed Nov 23, 2023
1 parent 6c7203b commit 472e9f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/RootLayout/QueryProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ export function QueryProvider({ children }: QueryProviderProps) {
case CODE.MALFORMED_JWT:
case CODE.INVALID_SIGNATURE:
case CODE.INVALID_HEADER_FORMAT:
case CODE.NO_AUTHORIZATION_HEADER:
fireToast(store.dispatch, "잘못된 접근입니다.", 3000);

delete axios.defaults.headers.common.Authorization;

await AsyncStorage.removeItem("accessToken");

case CODE.NO_AUTHORIZATION_HEADER:
fireToast(store.dispatch, "잘못된 접근입니다.", 3000);

queryClient.removeQueries({
predicate: ({ queryKey }) => {
const [queryType, ..._] = queryKey;
Expand Down

0 comments on commit 472e9f5

Please sign in to comment.