Join Nostr
2026-09-21 03:29:31 UTC

npub1sz…7t4fx on Nostr: the spotify ukf bot keeps breaking, but I think I've finally narrowed the bug down to ...

the spotify ukf bot keeps breaking, but I think I've finally narrowed the bug down to the PKCE refresh token handling in the library I'm using

if I'm right, the bug is that my script runs hourly and the tokens expire in an hour, and the library *locally* checks for expiry in order to trigger a refresh, but if a local check passes when the token has a few tens of milliseconds of lifetime left then it doesn't refresh, but by the time it reaches Spotify's API server it has expired.