extensions/github-authentication/src/github.ts/GitHubAuthenticationProvider/checkForUpdates
class GitHubAuthenticationProvider:	private async checkForUpdates() {
		let storedSessions: vscode.AuthenticationSession[];
		try {
			storedSessions = await this.readSessions();
		} catch (e) {
			// Ignore, network request failed
			return;
		}

		const added: vscode.AuthenticationSession[] = [];
		const removed: vscode.AuthenticationSession[] = [];

		storedSessions.forEach(session => {
			const matchesExisting = this._sessions.some(s => s.id === session.id);
			// Another window added a session to the keychain, add it to our state as well
			if (!matchesExisting) {
				Logger.info('Adding session found in keychain');
				this._sessions.push(session);
				added.push(session);
			}
		});

		this._sessions.forEach(session => {
			const matchesExisting = storedSessions.some(s => s.id === session.id);
			// Another window has logged out, remove from our state
			if (!matchesExisting) {
				Logger.info('Removing session no longer found in keychain');
				const sessionIndex = this._sessions.findIndex(s => s.id === session.id);
				if (sessionIndex > -1) {
					this._sessions.splice(sessionIndex, 1);
				}

				removed.push(session);
			}
		});

		if (added.length || removed.length) {
			this._sessionChangeEmitter.fire({ added, removed, changed: [] });
		}
	}