mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 12:40:19 -05:00
Await keychain write on logout for github auth
This commit is contained in:
@@ -137,7 +137,7 @@ export class GitHubAuthenticationProvider {
|
||||
this._sessions.push(session);
|
||||
}
|
||||
|
||||
this.storeSessions();
|
||||
await this.storeSessions();
|
||||
}
|
||||
|
||||
public async logout(id: string) {
|
||||
@@ -145,9 +145,13 @@ export class GitHubAuthenticationProvider {
|
||||
if (sessionIndex > -1) {
|
||||
const session = this._sessions.splice(sessionIndex, 1)[0];
|
||||
const token = await session.getAccessToken();
|
||||
await this._githubServer.revokeToken(token);
|
||||
try {
|
||||
await this._githubServer.revokeToken(token);
|
||||
} catch (_) {
|
||||
// ignore, should still remove from keychain
|
||||
}
|
||||
}
|
||||
|
||||
this.storeSessions();
|
||||
await this.storeSessions();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user