Auth providers - show dialog on token access, closes #89754

This commit is contained in:
Rachel Macfarlane
2020-02-06 15:30:42 -08:00
parent a4c2d6337d
commit cf96b11223
7 changed files with 59 additions and 22 deletions

View File

@@ -20,8 +20,14 @@ export class MainThreadAuthenticationProvider {
public readonly displayName: string
) { }
getSessions(): Promise<ReadonlyArray<modes.AuthenticationSession>> {
return this._proxy.$getSessions(this.id);
async getSessions(): Promise<ReadonlyArray<modes.AuthenticationSession>> {
return (await this._proxy.$getSessions(this.id)).map(session => {
return {
id: session.id,
accountName: session.accountName,
accessToken: () => this._proxy.$getSessionAccessToken(this.id, session.id)
};
});
}
login(scopes: string[]): Promise<modes.AuthenticationSession> {