Skip to content

Commit

Permalink
fix(js SDK): getAccessTokenByRefreshToken should not return idToken
Browse files Browse the repository at this point in the history
getAccessTokenByRefreshToken should not return idToken
  • Loading branch information
simeng-li committed Jun 25, 2022
1 parent 53c5eed commit 95a1b96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,13 @@ export default class LogtoClient {
const { tokenEndpoint } = await this.getOidcConfig();
const { accessToken, refreshToken, idToken, scope, expiresIn } =
await fetchTokenByRefreshToken(
{ clientId, tokenEndpoint, refreshToken: this.refreshToken, resource },
{
clientId,
tokenEndpoint,
refreshToken: this.refreshToken,
resource,
scopes: ['offline_access'], // Force remove openid scope from the request
},
this.requester
);

Expand Down

0 comments on commit 95a1b96

Please sign in to comment.