src/vs/workbench/api/common/extHostAuthentication.ts/ExtHostAuthentication/getSession
class ExtHostAuthentication:	async getSession(requestingExtension: IExtensionDescription, providerId: string, scopes: readonly string[], options: vscode.AuthenticationGetSessionOptions = {}): Promise<vscode.AuthenticationSession | undefined> {
		const extensionId = ExtensionIdentifier.toKey(requestingExtension.identifier);
		const inFlightRequests = this._inFlightRequests.get(extensionId) || [];
		const sortedScopes = [...scopes].sort().join(' ');
		let inFlightRequest: GetSessionsRequest | undefined = inFlightRequests.find(request => request.scopes === sortedScopes);

		if (inFlightRequest) {
			return inFlightRequest.result;
		} else {
			const session = this._getSession(requestingExtension, extensionId, providerId, scopes, options);
			inFlightRequest = {
				scopes: sortedScopes,
				result: session
			};

			inFlightRequests.push(inFlightRequest);
			this._inFlightRequests.set(extensionId, inFlightRequests);

			try {
				await session;
			} finally {
				const requestIndex = inFlightRequests.findIndex(request => request.scopes === sortedScopes);
				if (requestIndex > -1) {
					inFlightRequests.splice(requestIndex);
					this._inFlightRequests.set(extensionId, inFlightRequests);
				}
			}

			return session;
		}
	}