mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #367] Enable loading refresh/access token from env #112
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#112
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?
Originally created by @djedlajn on GitHub (Oct 27, 2022).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/367
Is your feature request related to a problem? Please describe.
I would appreciate the ability to load the access/refresh token pair from ENV and use them. Maybe it's possible now but if not I'm willing to put some effort into making such PR (mind I'm very new to Rust so it might take a while).
Describe the solution you'd like
Load the access/refresh token manually to avoid the need for prompting for auth.
@ramsayleung commented on GitHub (Oct 29, 2022):
You could directly read
access_tokenandrefresh_tokenfrom the environment variable, and assign them to theToken. Taking thetest_read_token_cachefunction for example, instead of hard coding the token, you could read the token from ENV:@djedlajn commented on GitHub (Oct 30, 2022):
@ramsayleung That works perfectly. Thanks for the hints.