From e22e225a2cd166ed7f43c2bf4a95ab27f8011013 Mon Sep 17 00:00:00 2001 From: Rahul kumar Singh Date: Mon, 21 Apr 2025 22:26:44 +0530 Subject: [PATCH] Fix - spotify throwing error In Spotify.js, getAccessTokenFromCode API is returning response object, which is passed to getUserFromAccessToken which parsing access_token in BaseAuthCodeAdapter, due to which it is throwing error - Spotify API request failed (from SpotifyAdapter line 79). Signed-off-by: Rahul kumar Singh --- src/Adapters/Auth/spotify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Adapters/Auth/spotify.js b/src/Adapters/Auth/spotify.js index c3304c6348..674c62d5c1 100644 --- a/src/Adapters/Auth/spotify.js +++ b/src/Adapters/Auth/spotify.js @@ -111,7 +111,8 @@ class SpotifyAdapter extends BaseAuthCodeAdapter { throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Spotify API request failed.'); } - return response.json(); + let responseJson = await response.json(); + return responseJson.access_token; } }