diff --git a/src/login/index.js b/src/login/index.js index 99a7dc1..913d642 100644 --- a/src/login/index.js +++ b/src/login/index.js @@ -64,8 +64,13 @@ var loginModule = angular.module('accountant.login', [ }); }; + var cancelLogin = function () { + // FIXME Alexis Lahouze 2017-06-11 Redirect to error page. + }; + return { - 'login': login + 'login': login, + 'cancelLogin': cancelLogin }; }) @@ -142,6 +147,8 @@ var loginModule = angular.module('accountant.login', [ .run(function($rootScope, LoginService) { var onAuthLoginRequired = $rootScope.$on('event:auth-loginRequired', LoginService.login); + var onAuthLoginCancelled = $rootScope.$on('event:auth-loginCancelled', LoginService.cancelLogin); + $rootScope.$on('$destroy', function() { onAuthLoginRequired = angular.noop(); });