zembrodt / showtunes

Angular App to display music you are currently listening to
GNU General Public License v3.0
3 stars 0 forks source link

403 response from Spotify not fully handling the logout #63

Closed zembrodt closed 1 month ago

zembrodt commented 1 month ago

When the Spotify API responds with a non successful and non-401 response (such as 403), the Showtunes app "logs out" and deletes the auth token, but the app stays frozen and doesn't reflect the new logged out state

zembrodt commented 1 month ago

There could be a check here for the 403 case where it's a single failure but the token still works. Need to do some more investigating, but if the token still works after failure, then on a 403 response we could do a simple API call with the auth token to see if it's still valid, then re-do the request (in the interceptor). Otherwise, we'll need to logout the user and retrieve a new auth token.