mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #176] [CLOSED] Refresh token from cache when expired #291
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#291
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/176
Author: @borisfaure
Created: 1/10/2021
Status: ❌ Closed
Base:
master← Head:refresh-expired-token-from-cache📝 Commits (1)
f722e08Refresh token from cache when expired📊 Changes
1 file changed (+18 additions, -2 deletions)
View changed files
📝
src/oauth2.rs(+18 -2)📄 Description
Description
read_token_cachenow refreshes token if token is expired.Motivation and Context
I wanted
spotify.prompt_for_user_token().await.unwrap();to use the cache and refresh tokensType of change
How Has This Been Tested?
Tested manually with a token in cache that was expired for about 24h with this dumb code: https://github.com/borisfaure/spotifyctl
This was a draft PR since I wondered about the following:
Ps: This PR is no longer in draft state since it has been more than a month with no interaction from the maintainers: trying to get feedback without the PR being in Draft state.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.