Skip to content

[BUG] 토큰 재발급 실패 시 원인 무관 강제 로그아웃 #49

Closed

Description

@xYunaL

🚨 버그 요약 (Summary)

  • access token(15분) 만료 후 재발급을 시도할 때, 원인 구분 없이 clearAuthData()로 세션이 삭제됨.

👣 재현 방법 (Steps to Reproduce)

  1. /api/v1/auth/refresh` 가 401이 아닌 오류(502, 503, 네트워크 실패)로 실패
  2. localStorage의 accessToken, refreshToken이 삭제되고 이후 모든 API가 401

📱 환경 정보 (Environment)

  • 사용자 상태: 구글 로그인 유저
  • 발생 화면/API: 스캔 실행 시 POST /api/v1/scans, 원인은 POST /api/v1/auth/refresh
  • 환경: 운영(han-spoon.site), 백엔드 배포 직후

문제 위치는 프론트이므로 프론트 수정 후 백엔드 보강

[ 백엔드 수정 ]

  • 무효 토큰 401 본문 없음
  • refresh 회전 유예 없음

[ 프론트 수정 ]

  • auth.ts
  • authFetch.ts

Activity

  1. self-assigned this
    on Sep 12, 2026
  2. added theissue type on Sep 12, 2026
  3. added a commit that references this issue on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🐛 bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions