From 928921fc9ceb84ab2fa87fdd3b7444ef020f4f91 Mon Sep 17 00:00:00 2001 From: Evert Pot Date: Thu, 19 Nov 2020 21:48:38 -0500 Subject: [PATCH] Fix refresh bug for flows that don't have a client_secret. Refresh never worked for authorization_code in this manner. --- src/fetch-wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fetch-wrapper.ts b/src/fetch-wrapper.ts index 1517ad5..3a11d56 100644 --- a/src/fetch-wrapper.ts +++ b/src/fetch-wrapper.ts @@ -158,7 +158,7 @@ export default class OAuth2 { grant_type: 'refresh_token', refresh_token: previousToken.refreshToken }; - if ((this.options as any).clientSecret !== undefined) { + if ((this.options as any).clientSecret === undefined) { // If there is no secret, it means we need to send the clientId along // in the body. body.client_id = this.options.clientId;