Skip to content

Fix token refresh for all API routes#24

Merged
marwonn merged 1 commit intomasterfrom
claude/fix-spotify-auth-8N61s
Jan 25, 2026
Merged

Fix token refresh for all API routes#24
marwonn merged 1 commit intomasterfrom
claude/fix-spotify-auth-8N61s

Conversation

@marwonn
Copy link
Copy Markdown
Owner

@marwonn marwonn commented Jan 25, 2026

No description provided.

- Add refresh_token_if_needed() helper function that automatically
  refreshes expired tokens and updates token_create time
- Update all API routes to use the helper function
- Return proper 401 status code when token refresh fails
- Update frontend to handle 401 errors by redirecting to login
- This fixes "Error saving playlist" when session is stale
@marwonn marwonn merged commit 90e95d2 into master Jan 25, 2026
1 check passed
@marwonn marwonn deleted the claude/fix-spotify-auth-8N61s branch January 25, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants