From b5484ebbdb787d982b97c1bfb3ae7c07547af72a Mon Sep 17 00:00:00 2001 From: scientific-dev <69678617+Scientific-Guy@users.noreply.github.com> Date: Tue, 31 May 2022 21:14:07 +0530 Subject: [PATCH] feat: v9.2.1 --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- src/Client.ts | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3488e92..5e7e7f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ Version history of spotify-api.js since v4.0.5. --- +## v9.2.1 + +- fix(refreshToken): fix refresh token regeneration using only `refreshToken` field. [#83](https://github.com/spotify-api/spotify-api.js/issues/83#issuecomment-1140212527) + +**Released:** 31st May 2022
+**Status:** Recommended to use
+ +--- + ## v9.2.0 - fix(refreshToken): fix [Client.refreshFromMeta] error. [#83](https://github.com/spotify-api/spotify-api.js/issues/83#issuecomment-1122299829) diff --git a/package.json b/package.json index 4c41c9c..267a320 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spotify-api.js", - "version": "9.2.0", + "version": "9.2.1", "description": "A complete node js wrapper of spotify api with oauth support", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/Client.ts b/src/Client.ts index a83b091..1d96326 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -255,7 +255,7 @@ export class Client { this.refreshMeta = options.token; if (options.userAuthorizedToken) this.user = await new UserClient(this).patchInfo(); - } else if ('redirectURL' in options.token) { + } else if (('redirectURL' in options.token) || ('refreshToken' in options.token)) { const context = await this.auth.getUserToken(options.token as GetUserTokenOptions); this.refreshMeta = options.token;