dist/hello.all.js
function() {

		var _this = this;
		var utils = _this.utils;
		var error = utils.error;

		// Create a new promise
		var promise = utils.Promise();

		var p = utils.args({name:'s', options: 'o', callback: 'f'}, arguments);

		p.options = p.options || {};

		// Add callback to events
		promise.proxy.then(p.callback, p.callback);

		// Trigger an event on the global listener
		function emit(s, value) {
			hello.emit(s, value);
		}

		promise.proxy.then(emit.bind(this, 'auth.logout auth'), emit.bind(this, 'error'));

		// Network
		p.name = p.name || this.settings.default_service;
		p.authResponse = utils.store(p.name);

		if (p.name && !(p.name in _this.services)) {

			promise.reject(error('invalid_network', 'The network was unrecognized'));

		}
		else if (p.name && p.authResponse) {

			// Define the callback
			var callback = function(opts) {

				// Remove from the store
				utils.store(p.name, null);

				// Emit events by default
				promise.fulfill(hello.utils.merge({network:p.name}, opts || {}));
			};

			// Run an async operation to remove the users session
			var _opts = {};
			if (p.options.force) {
				var logout = _this.services[p.name].logout;
				if (logout) {
					// Convert logout to URL string,
					// If no string is returned, then this function will handle the logout async style
					if (typeof (logout) === 'function') {
						logout = logout(callback, p);
					}

					// If logout is a string then assume URL and open in iframe.
					if (typeof (logout) === 'string') {
						utils.iframe(logout);
						_opts.force = null;
						_opts.message = 'Logout success on providers site was indeterminate';
					}
					else if (logout === undefined) {
						// The callback function will handle the response.
						return promise.proxy;
					}
				}
			}

			// Remove local credentials
			callback(_opts);
		}
		else {
			promise.reject(error('invalid_session', 'There was no session to remove'));
		}

		return promise.proxy;
	}
function() {

		var _this = this;
		var utils = _this.utils;
		var error = utils.error;

		// Create a new promise
		var promise = utils.Promise();

		var p = utils.args({name:'s', options: 'o', callback: 'f'}, arguments);

		p.options = p.options || {};

		// Add callback to events
		promise.proxy.then(p.callback, p.callback);

		// Trigger an event on the global listener
		function emit(s, value) {
			hello.emit(s, value);
		}

		promise.proxy.then(emit.bind(this, 'auth.logout auth'), emit.bind(this, 'error'));

		// Network
		p.name = p.name || this.settings.default_service;
		p.authResponse = utils.store(p.name);

		if (p.name && !(p.name in _this.services)) {

			promise.reject(error('invalid_network', 'The network was unrecognized'));

		}
		else if (p.name && p.authResponse) {

			// Define the callback
			var callback = function(opts) {

				// Remove from the store
				utils.store(p.name, null);

				// Emit events by default
				promise.fulfill(hello.utils.merge({network:p.name}, opts || {}));
			};

			// Run an async operation to remove the users session
			var _opts = {};
			if (p.options.force) {
				var logout = _this.services[p.name].logout;
				if (logout) {
					// Convert logout to URL string,
					// If no string is returned, then this function will handle the logout async style
					if (typeof (logout) === 'function') {
						logout = logout(callback, p);
					}

					// If logout is a string then assume URL and open in iframe.
					if (typeof (logout) === 'string') {
						utils.iframe(logout);
						_opts.force = null;
						_opts.message = 'Logout success on providers site was indeterminate';
					}
					else if (logout === undefined) {
						// The callback function will handle the response.
						return promise.proxy;
					}
				}
			}

			// Remove local credentials
			callback(_opts);
		}
		else {
			promise.reject(error('invalid_session', 'There was no session to remove'));
		}

		return promise.proxy;
	}
function ( ) { var _this = this ; var utils = _this . utils ; var error = utils . error ; // Create a new promise var promise = utils . Promise ( ) ; var p = utils . args ( { name : 's' , options : 'o' , callback : 'f' } , arguments ) ; p . options = p . options || { } ; // Add callback to events promise . proxy . then ( p . callback , p . callback ) ; // Trigger an event on the global listener function emit ( s , value ) { hello . emit ( s , value ) ; } promise . proxy . then ( emit . bind ( this , 'auth.logout auth' ) , emit . bind ( this , 'error' ) ) ; // Network p . name = p . name || this . settings . default_service ; p . authResponse = utils . store ( p . name ) ; if ( p . name && ! ( p . name in _this . services ) ) { promise . reject ( error ( 'invalid_network' , 'The network was unrecognized' ) ) ; } else if ( p . name && p . authResponse ) { // Define the callback var callback = function ( opts ) { // Remove from the store utils . store ( p . name , null ) ; // Emit events by default promise . fulfill ( hello . utils . merge ( { network : p . name } , opts || { } ) ) ; } ; // Run an async operation to remove the users session var _opts = { } ; if ( p . options . force ) { var logout = _this . services [ p . name ] . logout ; if ( logout ) { // Convert logout to URL string, // If no string is returned, then this function will handle the logout async style if ( typeof ( logout ) === 'function' ) { logout = logout ( callback , p ) ; } // If logout is a string then assume URL and open in iframe. if ( typeof ( logout ) === 'string' ) { utils . iframe ( logout ) ; _opts . force = null ; _opts . message = 'Logout success on providers site was indeterminate' ; } else if ( logout === undefined ) { // The callback function will handle the response. return promise . proxy ; } } } // Remove local credentials callback ( _opts ) ; } else { promise . reject ( error ( 'invalid_session' , 'There was no session to remove' ) ) ; } return promise . proxy ; }
Remove any data associated with a given service @param string name of the service @param function callback
Remove any data associated with a given service