From c552a47e1b3f824d2c8785e0b1554b05933e8b4e Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 2 Feb 2024 16:00:26 +0100 Subject: [PATCH] Fix spotify provider --- .changesets/7dd98.patch.md | 1 + src/providers/spotify.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changesets/7dd98.patch.md diff --git a/.changesets/7dd98.patch.md b/.changesets/7dd98.patch.md new file mode 100644 index 00000000..340e237e --- /dev/null +++ b/.changesets/7dd98.patch.md @@ -0,0 +1 @@ +Fix: Fix spotify provider refresh token not being passed the credentials \ No newline at end of file diff --git a/src/providers/spotify.ts b/src/providers/spotify.ts index b26c2cc3..47abce49 100644 --- a/src/providers/spotify.ts +++ b/src/providers/spotify.ts @@ -42,7 +42,9 @@ export class Spotify implements OAuth2Provider { } public async refreshAccessToken(refreshToken: string): Promise { - const result = await this.client.refreshAccessToken(refreshToken); + const result = await this.client.refreshAccessToken(refreshToken, { + credentials: this.clientSecret + }); const tokens: SpotifyTokens = { accessToken: result.access_token, refreshToken: result.refresh_token,