[PR #553] [MERGED] Enhance resilience in OAuth flow #535

Closed
opened 2026-02-27 20:25:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/553
Author: @richardhapb
Created: 2/23/2026
Status: Merged
Merged: 2/24/2026
Merged by: @ramsayleung

Base: masterHead: improve-resilience-in-oauth-flow


📝 Commits (2)

  • b2c2579 feat: Enhance resilience in OAuth flow
  • 240e178 fix: remove unused import in rspotify-macros

📊 Changes

2 files changed (+11 additions, -5 deletions)

View changed files

📝 rspotify-macros/src/lib.rs (+0 -2)
📝 src/clients/oauth.rs (+11 -3)

📄 Description

Fixes #552

Description

Problem:
When the cached token is broken, the OAuth flow
fails and doesn't try to refresh the token.

Solution:
Fallback to prompt the user for the OAuth flow to
refetch the token and re-cache it.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

  • Change manually the cached tokens in the user_client_token.json cache file
  • Login will be fail
  • A new OAuth flow should be triggered

Is this change properly documented?

I am not sure if this should be included in the CHANGELOG.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/553 **Author:** [@richardhapb](https://github.com/richardhapb) **Created:** 2/23/2026 **Status:** ✅ Merged **Merged:** 2/24/2026 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `improve-resilience-in-oauth-flow` --- ### 📝 Commits (2) - [`b2c2579`](https://github.com/ramsayleung/rspotify/commit/b2c2579e97c21c54f25093f3adfe13a7574ae8eb) feat: Enhance resilience in OAuth flow - [`240e178`](https://github.com/ramsayleung/rspotify/commit/240e17850c11ea7e5b22387ffcb3363f63efb55b) fix: remove unused import in rspotify-macros ### 📊 Changes **2 files changed** (+11 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `rspotify-macros/src/lib.rs` (+0 -2) 📝 `src/clients/oauth.rs` (+11 -3) </details> ### 📄 Description Fixes #552 ## Description Problem: When the cached token is broken, the OAuth flow fails and doesn't try to refresh the token. Solution: Fallback to prompt the user for the OAuth flow to refetch the token and re-cache it. ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## How has this been tested? - Change manually the cached tokens in the `user_client_token.json` cache file - Login will be fail - A new OAuth flow should be triggered ## Is this change properly documented? I am not sure if this should be included in the CHANGELOG. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:25:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#535
No description provided.