When a call is made for a new access token it might not return the refresh token in the data.
This was the case with Spotify Api, only to find it out after 2 hours running. Because the first save is from the authorization and that contains the refresh token. The first call to refresh the access token (after 1 hour, expire time is 3600 sec.) sets the refresh token to null. And then after access token expires again (2nd hour) it gives the exception no refresh token available.
Some minor changes: Moved creating OAuthConnector after checks which throw exceptions.
When a call is made for a new access token it might not return the refresh token in the data. This was the case with Spotify Api, only to find it out after 2 hours running. Because the first save is from the authorization and that contains the refresh token. The first call to refresh the access token (after 1 hour, expire time is 3600 sec.) sets the refresh token to null. And then after access token expires again (2nd hour) it gives the exception no refresh token available.
Some minor changes: Moved creating OAuthConnector after checks which throw exceptions.
Signed-off-by: Hilbrand Bouwkamp hilbrand@h72.nl