Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix LB-432: Check spotify token scopes and fallback graciously #558
I implemented an initial check of the token scopes to save some other error being thrown (and caught adequately) by the Spotify web player.
While I was at it I improved the component unmounting in case of fallback to embedded player.
I hadn't though about it. Yes, that's much better. Is there stored somewhere the distinction wether the user is linked with the feature "play listens", or just an array of permissions?
Spotify does things a bit weird sometimes. As far as I know, for the front-end player to work properly, I need to check the user has either:
I think the simplest will be to return the array of scopes along with the token on page load, as well as during a refresh-token API call.