brim-borium/spotify_sdk

getAuthenticationToken()'s "scope" parameter is ignored on iOS.

Closed this issue · 2 comments

Describe the bug

To Reproduce

Request an auth token with a scope parameter, like so:

var scope = "app-remote-control,user-modify-playback-state,user-read-playback-state";
_authenticationToken = await SpotifySdk.getAuthenticationToken(
          clientId: _CLIENT_ID, redirectUrl: _REDIRECT_URL, scope: scope);

Expected behavior
I expect the Spotify client to open, and the user to be presented with the option to grant the Spotify app the requested scopes.

  • On Android, this behavior works correctly, and all three scopes are requested:

Screenshot_20210203-220707

  • On iOS, the scope parameter is ignored, and only 2 scopes are requested:

Screenshot 2021-02-03 at 10 06 26 PM

Smartphone (please complete the following information):

  • Device: iPhone5, Pixel 4a
  • Version 1.0.0

Additional context

It looks like this is implemented in Android here, but missing in iOS.

I think this is also missing in the web version, but haven't tried that.

It is fixed now thanks to @nishiths23. You can point now your pubspec to latest version from master or wait for the next release.

Thank you @nishiths23 @fotiDim!! 🤗