fixed sign out function

This commit is contained in:
Jon Lambson 2017-08-21 11:55:11 -06:00
parent 47243870e2
commit 198597dc3b
2 changed files with 12 additions and 11 deletions

View File

@ -123,9 +123,9 @@ app.controller('loginCtrl', [
vm.newIssuer = vm.defaultIssuer;
vm.setIssuer(vm.defaultIssuer);
vm.initGetSession = function() {
vm.getSession = function() {
return Auth.select(Auth.session);
}
};
vm.initListLoggedInProfiles = function () {
vm.activeProfiles = Auth.getActiveSessions();
@ -141,7 +141,7 @@ app.controller('loginCtrl', [
};
vm.signOut = function () {
vm.getSession().then(function(){
// TODO the sign-out url for each account should be fixed.
return Auth.signOut().then(function () {
if (Auth.sessions.length === 0) {
@ -150,6 +150,7 @@ app.controller('loginCtrl', [
}
window.alert("You are still logged in with other accounts.");
});
});
};
}]);

View File

@ -1,4 +1,4 @@
<nav class="navbar navbar-default navbar-fixed-top" ng-init="vm.initGetSession()">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">