Skip to content

로그아웃할 때 Background Fetch 저장소의 토큰과 원본을 지운다 #65

Description

@eigger

clearToken() / logout()은 localStorage만 본다. IndexedDB kibble-bf에는 동작하는 Bearer와 사진·영상 원본이 남는다. API는 헤더 Bearer만 받으므로 SW가 토큰을 들고 있어야 하는 것 자체는 불가피하다. 문제는 수명이다 — 로그아웃한 기기 디스크에 유효한 토큰이 남는다.

할 일

  • logout() / logoutAll() / 401로 세션을 지울 때 cancelAllBackgroundFetches()를 부른다. 진행 중 fetch·잡·blob이 한 번에 정리된다.
  • 공용 기기(주방 태블릿, §7.12)에서 다음 사용자가 이전 사용자의 첨부를 이어서 올리지 못하게 한다.

관련: PR #63 리뷰 항목 5. apps/web/lib/auth-context.tsx clearLocalSession.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions