[PR #262] [MERGED] support refresh token v2 #354

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/262
Author: @ramsayleung
Created: 10/10/2021
Status: Merged
Merged: 10/12/2021
Merged by: @marioortizmanero

Base: masterHead: ramsay_support_refresh_token_v2


📝 Commits (10+)

📊 Changes

22 files changed (+558 additions, -164 deletions)

View changed files

📝 Cargo.toml (+15 -0)
📝 examples/auth_code_pkce.rs (+4 -9)
📝 examples/oauth_tokens.rs (+6 -3)
examples/tasks.rs (+44 -0)
examples/ureq/threading.rs (+45 -0)
examples/with_auto_reauth.rs (+124 -0)
📝 examples/with_refresh_token.rs (+4 -12)
📝 rspotify-model/src/auth.rs (+5 -3)
📝 rspotify-model/src/idtypes.rs (+77 -20)
📝 src/auth_code.rs (+32 -33)
📝 src/auth_code_pkce.rs (+27 -26)
📝 src/client_creds.rs (+30 -17)
📝 src/clients/base.rs (+63 -12)
📝 src/clients/mod.rs (+4 -3)
src/clients/mutex/futures.rs (+18 -0)
src/clients/mutex/mod.rs (+12 -0)
src/clients/mutex/sync.rs (+1 -0)
📝 src/clients/oauth.rs (+3 -8)
📝 src/lib.rs (+5 -1)
📝 tests/test_models.rs (+10 -5)

...and 2 more files

📄 Description

Description

Closed #224 since the original PR isn't fresh anymore, it's a mess. Recreating a new PR to implement refresh token feature

Motivation and Context

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Please also list any relevant details for your test configuration

Test A: examples/with_reauth_token


🔄 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/262 **Author:** [@ramsayleung](https://github.com/ramsayleung) **Created:** 10/10/2021 **Status:** ✅ Merged **Merged:** 10/12/2021 **Merged by:** [@marioortizmanero](https://github.com/marioortizmanero) **Base:** `master` ← **Head:** `ramsay_support_refresh_token_v2` --- ### 📝 Commits (10+) - [`b9761ed`](https://github.com/ramsayleung/rspotify/commit/b9761edbc7cc89f98756c33d91e9ecb9d3526c9c) Add two examples - [`e3175e6`](https://github.com/ramsayleung/rspotify/commit/e3175e630da6cb903ea1f992983cf50298f8180a) Add customized mutex type - [`0eadefd`](https://github.com/ramsayleung/rspotify/commit/0eadefdd04482f855644390ba0dcb78dfb2c3f2c) Add doc and helper functions - [`84155f4`](https://github.com/ramsayleung/rspotify/commit/84155f4d08fe89d65c561ca4ab8bee43252b29c5) add refresh_token logic - [`cc72457`](https://github.com/ramsayleung/rspotify/commit/cc72457b763916126e3cb457eb53e5611b0b1900) fix compile error - [`7088f7f`](https://github.com/ramsayleung/rspotify/commit/7088f7f390d14cf103e3fcf1793900350773ba5f) fix example - [`a5438ef`](https://github.com/ramsayleung/rspotify/commit/a5438efd6e0b26d83606652196e6d0b8f5f5e3a9) Remove refresh token - [`509eed3`](https://github.com/ramsayleung/rspotify/commit/509eed308e140c0d3c024be9f5832ca44eae1a36) cargo fmt files - [`b04e9ce`](https://github.com/ramsayleung/rspotify/commit/b04e9ce54a0db363450b79a5ba648905cb18b14b) Fix failed tests - [`30bdbd1`](https://github.com/ramsayleung/rspotify/commit/30bdbd105928d48a88f4b731b51246edbc822316) Fix faield tests ### 📊 Changes **22 files changed** (+558 additions, -164 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+15 -0) 📝 `examples/auth_code_pkce.rs` (+4 -9) 📝 `examples/oauth_tokens.rs` (+6 -3) ➕ `examples/tasks.rs` (+44 -0) ➕ `examples/ureq/threading.rs` (+45 -0) ➕ `examples/with_auto_reauth.rs` (+124 -0) 📝 `examples/with_refresh_token.rs` (+4 -12) 📝 `rspotify-model/src/auth.rs` (+5 -3) 📝 `rspotify-model/src/idtypes.rs` (+77 -20) 📝 `src/auth_code.rs` (+32 -33) 📝 `src/auth_code_pkce.rs` (+27 -26) 📝 `src/client_creds.rs` (+30 -17) 📝 `src/clients/base.rs` (+63 -12) 📝 `src/clients/mod.rs` (+4 -3) ➕ `src/clients/mutex/futures.rs` (+18 -0) ➕ `src/clients/mutex/mod.rs` (+12 -0) ➕ `src/clients/mutex/sync.rs` (+1 -0) 📝 `src/clients/oauth.rs` (+3 -8) 📝 `src/lib.rs` (+5 -1) 📝 `tests/test_models.rs` (+10 -5) _...and 2 more files_ </details> ### 📄 Description ## Description Closed #224 since the original PR isn't fresh anymore, it's a mess. Recreating a new PR to implement refresh token feature ## Motivation and Context + #176 + #4 + #223 ## Dependencies None ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration Test A: examples/with_reauth_token --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:23 +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#354
No description provided.