Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify credentials expire if page not refreshed #119

Open
1 task
IkeHunter opened this issue Nov 5, 2024 · 0 comments
Open
1 task

Spotify credentials expire if page not refreshed #119

IkeHunter opened this issue Nov 5, 2024 · 0 comments
Labels
integration Involves connecting to the backend server and managing data between both

Comments

@IkeHunter
Copy link
Collaborator

Problem

After about an hour of listening to music, the spotify credentials will expire, and will only refresh if the user refreshes the page.

Possible solutions

  • Set a timer for less than 1h to auto refresh the token
  • When spotify web player throws an unauthorized error, make a request to refresh the token
  • Use the preexisting api route defined in Network.sendGetSpotifyToken, this will always return an updated token

Task

  • Automatically refresh the spotify credentials when/before the token expires

Note: You will need to run the project in network mode, I recommend setting the servers like this: https://github.com/ufosc/Jukebox-Server/blob/main/docs/Network-Mode.md, then running npm run network in the terminal. Alternatively, you can run docker-compose -f docker-compose.network.yml up, but this makes logs harder to read in the terminal.

@IkeHunter IkeHunter added the integration Involves connecting to the backend server and managing data between both label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Involves connecting to the backend server and managing data between both
Projects
None yet
Development

No branches or pull requests

1 participant