[PR #434] [MERGED] Bug Fix: Set refresh token to new access token before callback_fn is called #453

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/434
Author: @JoeyEamigh
Created: 8/14/2023
Status: Merged
Merged: 8/14/2023
Merged by: @ramsayleung

Base: masterHead: master


📝 Commits (1)

  • 1cb8a87 set refresh token to token before callback_fn

📊 Changes

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

View changed files

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

📄 Description

Description

callback_fn was not returning the refresh token in AuthCodeSpotify, so I simply moved the token.refresh_token = Some(refresh_token.to_string()); above the callback_fn directive to solve this problem.

Motivation and Context

Refresh token was not being returned after refetch_token was called.

Type of change

Please delete options that are not relevant.

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

How has this been tested?

I used it in my project and it does work. It is a two line

Is this change properly documented?

I figure this can be done once the PR is in.

Thanks for the great library!


🔄 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/434 **Author:** [@JoeyEamigh](https://github.com/JoeyEamigh) **Created:** 8/14/2023 **Status:** ✅ Merged **Merged:** 8/14/2023 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`1cb8a87`](https://github.com/ramsayleung/rspotify/commit/1cb8a87dc4757b8142f9435a3803b868f6f7ce30) set refresh token to token before callback_fn ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/auth_code.rs` (+2 -1) </details> ### 📄 Description ## Description `callback_fn` was not returning the refresh token in `AuthCodeSpotify`, so I simply moved the `token.refresh_token = Some(refresh_token.to_string());` above the `callback_fn` directive to solve this problem. ## Motivation and Context Refresh token was not being returned after `refetch_token` was called. ## 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? I used it in my project and it does work. It is a two line ## Is this change properly documented? I figure this can be done once the PR is in. Thanks for the great library! --- <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:47 +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#453
No description provided.