Gallery
Handy to know shizzle
Share
Explore
Extract Amazon Music Playlists - Create Spotify playlists

icon picker
Spotlistr textbox bug

Problem

When creating a playlist via , if the time taken by the user exceeds the expiry time of the accessToken, the playlist cannot be created. A 401 access token expired response is received from the Spotify API.
The user needs to refresh the page to update the app state so its sees/gets a fresh accessToken, and this means the playlist selections are lost.
Workaround: create the playlist in smaller chunks to avoid exceeding the accessToken expiry time.

Solution?

If the token expires, refresh it and try again?
Example of creating a playlist ​
image.png
The problem ​
image.png
LocalStorage data ​
image.png
handleCreatePlaylist looks like the first function that is called in the stack?
useRouter
router.refresh()
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.