fixed sign out function
This commit is contained in:
parent
47243870e2
commit
198597dc3b
|
@ -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.");
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue