From 05d34d6d389e0bac9889c1ee7cbb937a78173d0c Mon Sep 17 00:00:00 2001 From: simeng-li Date: Mon, 27 Jun 2022 16:15:21 +0800 Subject: [PATCH] fix(js): refresh access token without a resource should return id token refresh access token without a resource should return id token --- packages/browser/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 99c18b68d..5e441d96d 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -319,7 +319,7 @@ export default class LogtoClient { tokenEndpoint, refreshToken: this.refreshToken, resource, - scopes: ['offline_access'], // Force remove openid scope from the request + scopes: resource ? ['offline_access'] : undefined, // Force remove openid scope from the request }, this.requester );