fix: TKQC 인증 흐름 무한루프 방지 및 스크립트 로드 순서 정리

- api.js 401 핸들러: window.location.href 리다이렉트 제거, throw Error로 변경 (auth-manager가 처리)
- auth-manager.js refreshAuth(): throw error → return null (무한 리다이렉트 방지)
- auth-manager.js setupTokenExpiryCheck(): catch→logout 대신 then으로 변경 (이중 리다이렉트 방지)
- 모든 HTML: api.js를 auth-manager.js보다 먼저 로드하도록 순서 수정
- 누락 페이지(archive, issue-view)에 api.js + auth-manager.js 추가
- 전체 HTML 캐시 버스팅 버전 v=20260308로 통일

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-08 13:11:40 +09:00
parent 9647ae0d56
commit 81478dc6ac
15 changed files with 112 additions and 124 deletions

View File

@@ -69,10 +69,10 @@
</main>
<!-- JavaScript -->
<script src="/static/js/core/auth-manager.js"></script>
<script src="/static/js/core/permissions.js"></script>
<script src="/static/js/components/common-header.js"></script>
<script src="/static/js/api.js"></script>
<script src="/static/js/core/permissions.js?v=20260308"></script>
<script src="/static/js/components/common-header.js?v=20260308"></script>
<script src="/static/js/api.js?v=20260308"></script>
<script src="/static/js/core/auth-manager.js?v=20260308"></script>
<script>
// 페이지 초기화