[인증 오류 처리 개선] API 호출 시 인증 오류 발생 시 사용자 로그아웃 처리 및 인증 오류 페이지 추가. auth.global.ts에서 공개 라우트에 인증 오류 페이지 포함, 사용자 세션 정리 로직 개선.

This commit is contained in:
2025-09-26 09:02:47 +09:00
parent d60e60010b
commit 5687db9f25
4 changed files with 202 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
const { hasPagePermission } = usePermission();
// 공개 라우트 목록 (로그인 없이 접근 가능)
const publicRoutes = ["/login", "/register"];
const publicRoutes = ["/login", "/register", "/auth-error"];
// 공개 라우트인지 확인
const isPublicRoute = publicRoutes.some(route => to.path === route);