Spotify Troubles Maintaining Authorization in Windows
alexankitty opened this issue · 5 comments
Describe the bug
When putting in spotify authorization and generating tokens, the application is unable to perform a token refresh, and hitting ok or apply will cause the plugin to log out.
To Reproduce
Steps to reproduce the behavior:
- Go to tools
- Click Tuna Settings
- Click Spotify Tab
- Click open login page
- Follow normal authorization steps to grab code
- Paste code into Authentication code feel
- Click request token - the login will be performed successfully
- After this, clicking OK or Apply will cause the plugin to no longer be logged in and gray out the perform refresh - clicking perform refresh will do the same thing
- Clicking request token again will cause the plugin to throw back a message saying the authorization code is invalid.
Expected behavior
Log in to the spotify API should be maintained when saving settings or performing a token refresh (provided the refresh token isn't blocked for whatever reason)
Log
https://obsproject.com/logs/qiIFyW8sX_6F1tAY
Note: the websocket disconnects can be ignored as this stems from one of my overlays.
Additional context
This issue does not seem to be present in 1.5.2, however I'm unsure which version brought about this issue.
Can you try the latest nightly build? https://github.com/univrsal/tuna/actions/runs/1248449717
Just tried it, same results - authorization code is being invalidated and refreshing the token isn't working. I did use the installer version if that helps any.
Edit:
I tried the zip as well, and played around with it a bit. It looks like the OK and Apply buttons are no longer invalidating the login, however token refresh still seems to be b0rked.
Here's the response log
= 2021.09.18 05:46 =
{
"access_token": "REDACTED",
"expires_in": 3600,
"scope": "user-modify-playback-state user-read-playback-state user-read-currently-playing",
"token_type": "Bearer"
}
= 2021.09.18 05:46 =
{
"access_token": "REDACTED",
"expires_in": 3600,
"scope": "user-modify-playback-state user-read-playback-state user-read-currently-playing",
"token_type": "Bearer"
}
= 2021.09.18 05:48 =
{
"error": "invalid_grant",
"error_description": "Invalid authorization code"
}
= 2021.09.18 05:50 =
{
"error": "invalid_grant",
"error_description": "Invalid authorization code"
}
(last two are from trying to request another token on the same code after it invalidates)
and this is showing it's no longer logged in after performing the token refresh.
Okay so refreshing didn't work? It should now
https://github.com/univrsal/tuna/actions/runs/1248525954
Just tried the latest and working perfectly!
Nice