diff --git a/song_of_the_day/SpotifyIntegration/SpotifyApiClient.cs b/song_of_the_day/SpotifyIntegration/SpotifyApiClient.cs index 8c06e06..83a5960 100644 --- a/song_of_the_day/SpotifyIntegration/SpotifyApiClient.cs +++ b/song_of_the_day/SpotifyIntegration/SpotifyApiClient.cs @@ -139,7 +139,10 @@ public class SpotifyApiClient user.SpotifyAuthAccessToken = oAuthResponse.AccessToken; user.SpotifyAuthExpiresAfterSeconds = oAuthResponse.ExpiresIn; user.SpotifyAuthCreatedAt = oAuthResponse.CreatedAt; - user.SpotifyAuthRefreshToken = oAuthResponse.RefreshToken; + if (!string.IsNullOrEmpty(oAuthResponse.RefreshToken)) + { + user.SpotifyAuthRefreshToken = oAuthResponse.RefreshToken; + } return user.SpotifyAuthAccessToken; } catch (Exception ex)