mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
committed by
GitHub
parent
4c635ca9f9
commit
70e7eae770
@@ -484,11 +484,18 @@ export class MsalAuthProvider implements AuthenticationProvider {
|
||||
forceRefresh = true;
|
||||
claims = scopeData.claims;
|
||||
}
|
||||
let redirectUri: string | undefined;
|
||||
// If we have the broker available and are on macOS, we HAVE to include the redirect URI or MSAL will throw an error.
|
||||
// HOWEVER, if we are _not_ using the broker, we MUST NOT include the redirect URI or MSAL will throw an error.
|
||||
if (cachedPca.isBrokerAvailable && process.platform === 'darwin') {
|
||||
redirectUri = Config.macOSBrokerRedirectUri;
|
||||
}
|
||||
const result = await cachedPca.acquireTokenSilent({
|
||||
account,
|
||||
authority,
|
||||
scopes: scopeData.scopesToSend,
|
||||
claims,
|
||||
redirectUri,
|
||||
forceRefresh
|
||||
});
|
||||
sessions.push(this.sessionFromAuthenticationResult(result, scopeData.originalScopes));
|
||||
|
||||
Reference in New Issue
Block a user