feat: 로그아웃하면 서버에서도 그 계정의 토큰을 모두 무효로
This commit is contained in:
1 parent
be8f827556
commit
296a09d6db
11 files changed
+108
-10
No files matched your search
@@ -57,7 +57,8 @@ async function authFetch(input: RequestInfo | URL, init?: RequestInit): Promise<
|
||||
const anonymous = await fetch(withToken(retry, null))
|
||||
if (anonymous.status !== 401) return anonymous
|
||||
}
|
||||
emitAuthRequired()
|
||||
// 로그아웃하다 만료된 거면 로그인 창을 띄우지 않는다
|
||||
if (new URL(request.url).pathname !== '/v1/auth/logout') emitAuthRequired()
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user