[PR #245] [MERGED] Fix cached token scopes #338

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/245
Author: @Rigellute
Created: 8/30/2021
Status: Merged
Merged: 8/30/2021
Merged by: @marioortizmanero

Base: masterHead: master


📝 Commits (1)

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/lib.rs (+2 -1)

📄 Description

Description

Serde rename "scopes" to "scope", but leave struct type as "scopes".

Motivation and Context

The cached auth token was not being restored from the cache, prompting the login flow every time.

On inspecting the cache, the "scopes" property was empty.

Turns out this was because the form response from spotify does not contain a "scopes" field. But instead contains a "scope".

This PR simply renames the property to "scopes" as it's a small change. Let me know if there's a more appropriate fix.

Dependencies

Type of change

Please delete options that are not relevant.

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

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: xxx
  • Test B: xxx

🔄 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/245 **Author:** [@Rigellute](https://github.com/Rigellute) **Created:** 8/30/2021 **Status:** ✅ Merged **Merged:** 8/30/2021 **Merged by:** [@marioortizmanero](https://github.com/marioortizmanero) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`4a51f81`](https://github.com/ramsayleung/rspotify/commit/4a51f81d8a5342b7ae7a242b0b3d7154f1377861) Fix cached token scopes ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib.rs` (+2 -1) </details> ### 📄 Description ## Description Serde rename "scopes" to "scope", but leave struct type as "scopes". ## Motivation and Context The cached auth token was not being restored from the cache, prompting the login flow every time. On inspecting the cache, the "scopes" property was empty. Turns out this was because the form response from spotify does not contain a "scopes" field. But instead contains a "scope". This PR simply renames the property to "scopes" as it's a small change. Let me know if there's a more appropriate fix. ## Dependencies ## 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? 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: xxx - [ ] Test B: xxx --- <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:19 +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#338
No description provided.