Skip to content

[Android] Using PKCE Authentication, the token scopes appears empty #311

@yannallain

Description

@yannallain

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:

  1. Install the Android demo app
  2. Login with the PKCE method.
  3. 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]

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions