fix hasSession by using silent: true

This commit is contained in:
Tyler Leonhardt
2021-10-21 21:52:23 -07:00
parent 1eb38d79bb
commit bcb9df5afa

View File

@@ -234,7 +234,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
// TODO: remove this after GHPR and Codespaces move off of it
async hasSession(providerId: string, scopes: readonly string[]) {
checkProposedApiEnabled(extension);
return !!(await extHostAuthentication.getSession(extension, providerId, scopes, { solelyCheckExistence: true } as any));
return !!(await extHostAuthentication.getSession(extension, providerId, scopes, { silent: true } as any));
},
get onDidChangeSessions(): Event<vscode.AuthenticationSessionsChangeEvent> {
return extHostAuthentication.onDidChangeSessions;