-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically request token on startup #412
Comments
In the initialized design of this library, So we refactored this client and expose the From where I understand, this project is a library, it's not responsible to do everything for the developers, it should expose all possible facilities to developer instead. Additionally, it's only possible for In order to maintain a consistent behavior for all clients, it's necessary to require developer to call |
Ah, I can see how consistency to the other two authentication methods is nice. Still, for me as a fresh user of RSpotify, auto-authentication in ClientCredsSpotify seems less surprising and more user-friendly. I had assumed RSpotify abstracts over the authorization workflow. However, you have to be aware that the underlying Spotify API requires a token request call. And later, (this ties in with #413) you have to be aware that Spotify requires hourly re-authentication. The fact that RSpotify exposes these details, when they could easily be done by RSpotify itself, surprised me. Are there other API wrappers that require you to call an extra method after initializing the client to finish initialization? For example serenity doesn't |
The requirement could perhaps be put in the type system. |
Message to comment on stale issues. If none provided, will not mark issues stale |
Is your feature request related to a problem? Please describe.
Having to call
client.request_token().await?
once after initializing ClientCredsSpotify and before making the first API call seems a bit arbitrary and easy-to-forget.Describe the solution you'd like
RSpotify already seems to have auto-authentication capabilities. Could those be expanded to auto-authenticate on the first API call and not have to manually call
.request_token()
on startup?The text was updated successfully, but these errors were encountered: