Skip to content

Commit 1251bf0

Browse files
author
Rachel Macfarlane
committed
Fix accessToken function on login method for settings sync
1 parent b98f647 commit 1251bf0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/vs/workbench/api/browser/mainThreadAuthentication.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ export class MainThreadAuthenticationProvider {
3131
}
3232

3333
login(scopes: string[]): Promise<modes.AuthenticationSession> {
34-
return this._proxy.$login(this.id, scopes);
34+
return this._proxy.$login(this.id, scopes).then(session => {
35+
return {
36+
id: session.id,
37+
accountName: session.accountName,
38+
accessToken: () => this._proxy.$getSessionAccessToken(this.id, session.id)
39+
};
40+
});
3541
}
3642

3743
logout(accountId: string): Promise<void> {

0 commit comments

Comments
 (0)