brim-borium / spotify_sdk

Flutter Package to connect the spotify sdk
https://pub.dev/packages/spotify_sdk
Apache License 2.0
153 stars 82 forks source link

[Help] How do i manage access token to interact with web api? #207

Closed JosephKorel closed 1 year ago

JosephKorel commented 1 year ago

Hi, I want to connect the user with its Spotify account and then interact with it using the web api, using the acessToken. I did all the steps in the docs and I'm able to connect to the Spotify account, but I'm not sure how to proced after that. If i close the app, I lose the connection and i have to request it again. So what should i do to always have a valid token without having to keep calling getAccessToken?

Thanks in advance

fotiDim commented 1 year ago

@JosephKorel this is just how the native Spotify SDK works. You can open an issue there if you are missing functionality and we can support it when the native SDK does.

JosephKorel commented 1 year ago

@fotiDim Thanks for your reply. Do you have a suggestion of how i can manage the token or store it? My goal is to keep the session so i won't have to ask access everytime.

fotiDim commented 1 year ago

@JosephKorel the topic has been thoroughly covered in the native iOS SDK repo. I suggest you do a search there. My personal suggestion is don't bother with this method because last time I checked, on Android there was no way to do so and it was buggy on iOS.