Skip to content

Commit

Permalink
fix: access token is not updated on refresh on SFDX store due to synt…
Browse files Browse the repository at this point in the history
…ax mismatch
  • Loading branch information
Codeneos committed Aug 4, 2023
1 parent 4e57901 commit a017ad6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export class SfdxConnectionProvider extends SalesforceConnectionProvider {
const conn = await this.jsforceProvider.getJsForceConnection();
if (conn[refreshListenerSymbol] !== true) {
conn[refreshListenerSymbol] = true;
conn.on('refresh', (accessToken) => {
sfdx.updateTokens(this.usernameOrAlias, accessToken)
conn.on('refresh', (accessToken: string) => {
sfdx.updateTokens(this.usernameOrAlias, { accessToken })
.then(() => this.logger.verbose(`Updated SFDX access token for user ${this.usernameOrAlias}`))
.catch((err) => this.logger.warn(`Unable store updated SFDX access token ${this.usernameOrAlias}`, err));
});
Expand Down

0 comments on commit a017ad6

Please sign in to comment.