Add automatic access token refreshment when expired #1
Labels
api
An issue directly related to the public api of the library
authorization
An issue related to the authorization
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently when the access token expires the API can no longer make any request to the Spotify Web API. There is no system in place that detects whether the access token has expired and refreshes the token when necessary.
The feature request is to implement a system that will refresh the access token automatically when expired using the already existing
AuthorizationRefreshToken
.Describe the solution you'd like
The system should be able to detect when the token has expired. When it has detected that the token has expired it will make a request to Spotify Authorization API for a new access token. When the new access token has been obtained it should update all services that use that token to make requests.
Describe alternatives you've considered
None at the moment.
Additional context
This feature should be implemented in
SpotifyApi
, or somewhere else if it is more fitting but should be well substantiated why it is done that way.The text was updated successfully, but these errors were encountered: