src/vs/workbench/services/authentication/browser/authenticationService.ts/getCurrentAuthenticationSessionInfo
export async function getCurrentAuthenticationSessionInfo(credentialsService: ICredentialsService, productService: IProductService): Promise<AuthenticationSessionInfo | undefined> {
	const authenticationSessionValue = await credentialsService.getPassword(`${productService.urlProtocol}.login`, 'account');
	if (authenticationSessionValue) {
		const authenticationSessionInfo: AuthenticationSessionInfo = JSON.parse(authenticationSessionValue);
		if (authenticationSessionInfo
			&& isString(authenticationSessionInfo.id)
			&& isString(authenticationSessionInfo.accessToken)
			&& isString(authenticationSessionInfo.providerId)
		) {
			return authenticationSessionInfo;
		}
	}
	return undefined;
}