Created
September 12, 2014 17:53
-
-
Save tanordheim/0f925a0e13b0f060ad6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("app").controller("AppCtrl", function($scope, $http, $window, configuration, currentUserFactory, authService) { | |
$scope.config = configuration; | |
$scope.$on("event:auth-loginRequired", function() { | |
$http.post("/auth/refresh").then(function(response) { | |
authService.loginConfirmed(); | |
}, function(response) { | |
$window.location.href = "/auth/logged_out"; | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment