Clear account tokens before refresh (#18452)

* clear account tokens on refresh

* update refresh button after refresh
This commit is contained in:
Christopher Suh
2022-02-17 17:25:05 -08:00
committed by GitHub
parent 3472e229f1
commit bafbca492b
2 changed files with 6 additions and 0 deletions

View File

@@ -172,6 +172,11 @@ export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disp
}
refresh(account: AzureAccount): Thenable<AzureAccount | azdata.PromptFailedResult> {
return this._refresh(account);
}
private async _refresh(account: AzureAccount): Promise<AzureAccount | azdata.PromptFailedResult> {
await this._clear(account.key);
return this.prompt();
}

View File

@@ -418,6 +418,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
if (account) {
await this._accountManagementService.refreshAccount(account);
await this.fillInAzureAccountOptions();
this.updateRefreshCredentialsLink();
}
}));
}