diff --git a/frontend/src/api/setup.ts b/frontend/src/api/setup.ts index b5217e6..34dcde4 100644 --- a/frontend/src/api/setup.ts +++ b/frontend/src/api/setup.ts @@ -58,8 +58,8 @@ async function authFetch(input: RequestInfo | URL, init?: RequestInit): Promise< const anonymous = await fetch(withToken(retry, null)) if (anonymous.status !== 401) return anonymous } - // 로그아웃하다 만료된 거면 로그인 창을 띄우지 않는다 - if (new URL(request.url).pathname !== '/v1/auth/logout') emitAuthRequired() + // 로그인 창은 사람이 한 동작(글쓰기·댓글 등)에만 띄운다. 화면이 알아서 받는 GET(내 정보 등)이나 로그아웃이 만료로 401이면 조용히 로그아웃 상태로 둔다 + if (request.method !== 'GET' && new URL(request.url).pathname !== '/v1/auth/logout') emitAuthRequired() return response }