mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 16:25:52 +03:00
[PR #983] [MERGED] adding callback for reusable credentials #1173
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1173
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/librespot-org/librespot/pull/983
Author: @Louis9902
Created: 4/2/2022
Status: ✅ Merged
Merged: 5/20/2022
Merged by: @roderickvd
Base:
dev← Head:cred-cache📝 Commits (3)
6a34c95change session connect to return longterm credsb39f38eupdate changelog with api changesaac4567Merge branch 'dev' into cred-cache📊 Changes
7 files changed (+17 additions, -8 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
core/src/session.rs(+7 -4)📝
core/tests/connect.rs(+1 -0)📝
examples/get_token.rs(+1 -1)📝
examples/play.rs(+1 -1)📝
examples/playlist_tracks.rs(+1 -1)📝
src/main.rs(+4 -1)📄 Description
This adds a callback to the creation of the session, so the reusable credentials can be stored separately. This is useful when using a keychain or something like the secret_service api.
The way it's implemented, no API is broken but the possibility to reuse the credentials is there.
Why do I wan't this?
When using librespot without the cache, Spotify will send an email about a new login attempt when using the password credentials, with the long-lived token this does not happen. But I don't want to either use the cache or I don't want the token in a json file on my fs.
Feel free to give me some feedback or another solution, but I’m relatively new to rust, so I might ask some questions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.