✨ feat: AuthProvider 상태 관리 로직 수정 #84
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 작업 개요 (필수)
로그아웃 상태에서도 1분마다 메인으로 튀던 문제 해결
로그인 상태에서도 1분마다 세션이 풀리던 문제 해결
만료 타이머 동작을 “로그인 중 + 만료시각 존재”로 한정, 부트스트랩 시 만료시각 누락 자기치유 추가
상태: user 단일 상태만 유지(파생값: isLogin, role, bootstrapped)
logout(redirectTo?: string | false) 옵션 유지
✨ 작업 내용 (필수)
📸 스크린샷
🧐 해결해야 하는 문제
🤔 리뷰어 확인 필요 사항
로그인 시: expiresAt 설정(10분 후) → 1분 주기로 확인 → 정말 만료 되었을 때만 로그아웃
로그아웃 시: 타이머가 아예 실행되지 않음(리다이렉트 없음)
부트스트랩: token/userId는 있으나 expiresAt이 없는 과거 세션이면 즉시 재설정(자기치유)
로그아웃 상태로 2~3분 대기 → 페이지가 유지되어야 함(이동 X)
로그인 후 DevTools에서 thejulge_expires_at 삭제 → 1분 대기 → 세션 유지(부트스트랩 자기치유로 복구)
로그인 후 10분 경과 → 자동 로그아웃 1회 발생 + 메인 이동
🔗 관련 이슈
🛠️ 후속 작업
✅ 체크리스트 (필수)