Skip to content

[REFACTOR] Improve Spotify token management with expiration check #135

@ramong26

Description

@ramong26

문제점

  • src/lib/spotify/spotifyTokenManager.ts에서 전역 변수로 토큰 캐싱
  • 토큰 만료 시간 체크 없음
  • 에러 처리 전혀 없음

개선 사항

  • 토큰 만료 시간 추가 (expiresAt)
  • 만료된 토큰 자동 갱신
  • try-catch 에러 처리 추가
  • TypeScript 타입 정의 (TokenCache, SpotifyTokenResponse)

참고

관련 PR: #134

Metadata

Metadata

Assignees

Labels

refactorExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions