[Android] Using PKCE Authentication, the token scopes appears empty
Hello,
Perhaps I'm missing something but I was trying to debug an issue while implementing the PKCE authentication from the library and, while logging the scopes of the API, I saw that the scopes were empty even though they were provided in the SpotifyPkceLoginActivityImpl.scopes property.
I also reproduced these empty scopes in the Android demo app
Issue: Token scopes of the API are empty
When I want to check the scopes of the current api token, the scopes are always at null even if in the SpotifyPkceLoginActivityImpl all the list of available SpotifyScope is passed as
override val scopes = SpotifyScope.values().toList()
Hence, for example, calling api.hasScope(SpotifyScope.PLAYLIST_READ_PRIVATE) always return false.
To Reproduce Steps to reproduce the behavior:
- Install the Android demo app
- Login with the PKCE method.
- Add some logs of the
api.token.scopes.
Expected behavior
The list of scopes is available from the api.token.scopes or from api.hasScope(SpotifyScope.*)
Smartphone:
- Device: [OnePlus 9]
- OS: [Android 12]
Yep, this is definitely an issue! The token string is not stored. Thank you for reporting this