Error trying to refresh the access token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am currently developing a mobile application that uses Spotify integration, as you may know when authenticating with spotify we receive an access token and a refresh token, the first one expires after an hour and the second one is used to request a new token.
From my mobile application I request the user to give me permissions to his spotify account, therefore, he enters his credentials and I receive the access token, refresh token and calculate at the time it will expire. These values are stored in my database in a secure way and are associated to the user, also they are used by my backend where I have a scheduled task that is responsible for automatically refresh the access tokens in case they are close to expire, to achieve this I must use the refresh token and the request responsible for doing so sometimes responds with these errors 500:
- Failed to remove token
- ECONNRESET
Therefore, the refresh token is revoked and my scheduled task cannot update the access token anymore.
Does anyone know why these errors occur?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page