From 07c7af4633a0816f9f53ac4d261354a125761bfa Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Sat, 26 Jul 2025 16:32:41 +0200 Subject: [PATCH] fix: proper Spotify token refresh flow, refs: NOISSUE --- song_of_the_day/SpotifyIntegration/SpotifyApiClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)