tltx/micropython-spotify-web-api

Selecting "All devices" during setup leads to authentication loop

Opened this issue · 1 comments

Creating a first issue here.

When setting up spotify_web_api with Spotify and selecting "All devices" I get stuck in an authentication loop.

"All decices" credentials.json:

{
    "refresh_token": "AQD...", 
    "access_token": "BQE...", 
    "device_id": null, 
    "client_secret": "29f...", 
    "client_id": "17c..."
}

Single device credentials.json:

{
    "refresh_token": "AQD...", 
    "access_token": "BQE...", 
    "device_id": "4fb...", 
    "client_secret": "29f...", 
    "client_id": "17c..."
}

I think assert credentials['device_id'] in load_credentials() does not work with a null value, therefore it always starts authorization_code_flow.py.

tltx commented

Good catch. I have made a fix for it on master. f61a01f