hmkim 06-09
250609 김혜민 로그아웃 세션 및 토큰제거 수정 2
@df503a9b46a4a5922411f512786bb0814925e56c
client/views/pages/AppStore.js
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
@@ -124,7 +124,6 @@
     },
     actions: {
       async logout({ commit, state, dispatch }) {
-        console.log('로그아웃 프로세스 시작');
         
         const ctx = state.contextPath;
         const admPath = state.path?.includes("/adm");
@@ -132,68 +131,38 @@
         
         try {
           // 1. 서버 로그아웃 API 호출 (모든 모드에서 호출)
-          try {
             const res = await logOutProc();
-            console.log('서버 로그아웃 응답:', res);
-            
-            if (res?.data?.message) {
-              console.log('로그아웃 메시지:', res.data.message);
-            }
-          } catch (apiError) {
-            // API 호출 실패해도 클라이언트 정리는 계속 진행
-            console.warn('서버 로그아웃 API 호출 실패:', apiError.message);
-          }
-          
           // 2. 클라이언트 완전 정리
           await dispatch('performCompleteCleanup', { loginMode, ctx, admPath });
-          
         } catch (error) {
-          console.error("로그아웃 처리 중 오류:", error);
-          
           // 오류 발생해도 클라이언트 정리는 수행
           await dispatch('performCompleteCleanup', { loginMode, ctx, admPath });
-          
-          // 사용자에게는 간단한 메시지만 표시
-          console.log("로그아웃 처리가 완료되었습니다.");
         }
       },
       
       // 완전한 클라이언트 정리 수행
       async performCompleteCleanup({ commit, dispatch }, { loginMode, ctx, admPath }) {
         try {
-          console.log('클라이언트 정리 시작');
-          
           // 1. 상태 초기화
           commit("setStoreReset");
-          
           // 2. 모든 저장소 완전 정리
           dispatch('clearAllStorages');
-          
           // 3. 모든 쿠키 제거
           dispatch('clearAllCookies');
-          
           // 4. 세션 무효화 (세션 모드인 경우)
           if (loginMode === 'S') {
             dispatch('invalidateSession');
           }
-          
           // 5. 브라우저 캐시 정리
           dispatch('clearBrowserCache');
-          
           // 6. 페이지 리다이렉트
           const loginUrl = admPath ? 
             (ctx || '') + "/cmslogin.page" : 
             (ctx || '') + "/login.page";
-            
-          console.log('로그인 페이지로 이동:', loginUrl);
-          
           // 히스토리 정리 후 이동
           window.history.replaceState(null, '', loginUrl);
           window.location.href = loginUrl;
-          
         } catch (cleanupError) {
-          console.error('클라이언트 정리 중 오류:', cleanupError);
-          
           // 최종 수단: 강제 새로고침
           window.location.reload();
         }
@@ -201,7 +170,6 @@
       
       // 모든 저장소 정리
       clearAllStorages() {
-        try {
           // localStorage 완전 정리
           const localStorageKeys = Object.keys(localStorage);
           localStorageKeys.forEach(key => {
@@ -215,16 +183,10 @@
             sessionStorage.removeItem(key);
           });
           sessionStorage.clear();
-          
-          console.log('모든 저장소 정리 완료');
-        } catch (error) {
-          console.error('저장소 정리 중 오류:', error);
-        }
       },
       
       // 모든 쿠키 제거
       clearAllCookies() {
-        try {
           const cookiesToDelete = [
             // 일반 인증 쿠키
             'refresh', 
@@ -286,30 +248,19 @@
               });
             });
           });
-          
-          console.log('모든 쿠키 제거 완료');
-        } catch (error) {
-          console.error('쿠키 제거 중 오류:', error);
-        }
       },
       
       // 세션 무효화
       invalidateSession() {
-        try {
           // 세션 무효화를 위한 더미 요청 (필요한 경우)
           fetch('/mbr/sessionInvalidate', {
             method: 'POST',
             credentials: 'include'
           }).catch(() => {}); // 실패해도 무시
-          
-        } catch (error) {
-          console.error('세션 무효화 중 오류:', error);
-        }
       },
       
       // 브라우저 캐시 정리
       clearBrowserCache() {
-        try {
           // 캐시 API 지원 확인 및 정리
           if ('caches' in window) {
             caches.keys().then(cacheNames => {
@@ -329,10 +280,6 @@
               } catch (e) {}
             });
           }
-          
-        } catch (error) {
-          console.error('브라우저 캐시 정리 중 오류:', error);
-        }
       },
 
       setUserType({ commit }, userType) {
Add a comment
List