function gotoLogin() {
        const $http = $injector.get('$http');
        const $rootScope = $injector.get('$rootScope');

        session.del('authed');
        $window.localStorage.removeItem('cloud-inquisitor');
        $rootScope.$broadcast('auth-logout');
        $http.get('/auth/login').then(
            response => {
                if (response.data.hasOwnProperty('state')) {
                    goto(response.data.state);
                } else if (response.data.hasOwnProperty('url')) {
                    redirect(response.data.url);
                }
            },
            () => {
                toast('Failed fetching login information', 'error');
            }
        );
    }
/**
     * Redirect the user to the login page, after clearing any stale session data
     */
Redirect the user to the login page, after clearing any stale session data
Redirect the user to the login page after clearing any stale session data
function gotoLogin() {
        const $http = $injector.get('$http');
        const $rootScope = $injector.get('$rootScope');
        session.del('authed');
        $window.localStorage.removeItem('cloud-inquisitor');
        $rootScope.$broadcast('auth-logout');
        $http.get('/auth/login').then(
            response => {
                if (response.data.hasOwnProperty('state')) {
                    goto(response.data.state);
                } else if (response.data.hasOwnProperty('url')) {
                    redirect(response.data.url);
                }
            },
            () => {
                toast('Failed fetching login information', 'error');
            }
        );
    }
function gotoLogin ( ) { const $http = $injector . get ( '$http' ) ; const $rootScope = $injector . get ( '$rootScope' ) ; session . del ( 'authed' ) ; $window . localStorage . removeItem ( 'cloud-inquisitor' ) ; $rootScope . $broadcast ( 'auth-logout' ) ; $http . get ( '/auth/login' ) . then ( response => { if ( response . data . hasOwnProperty ( 'state' ) ) { goto ( response . data . state ) ; } else if ( response . data . hasOwnProperty ( 'url' ) ) { redirect ( response . data . url ) ; } } , ( ) => { toast ( 'Failed fetching login information' , 'error' ) ; } ) ; }
Redirect the user to the login page, after clearing any stale session data
Redirect the user to the login page after clearing any stale session data