Commit 3ce739a5 authored by Randall Leeds's avatar Randall Leeds

Handle sign out failure

parent 1db1463d
...@@ -22,9 +22,11 @@ configure = [ ...@@ -22,9 +22,11 @@ configure = [
] ]
identityProvider.forgetAuthentication = [ identityProvider.forgetAuthentication = [
'session', 'flash', 'session',
(session) -> (flash, session) ->
session.logout({}).$promise session.logout({}).$promise.catch (err) ->
flash 'error', 'Sign out failed!'
throw err
] ]
identityProvider.requestAuthentication = [ identityProvider.requestAuthentication = [
......
...@@ -66,7 +66,7 @@ identityProvider = -> ...@@ -66,7 +66,7 @@ identityProvider = ->
### ###
logout: -> logout: ->
result = $injector.invoke(provider.forgetAuthentication, provider) result = $injector.invoke(provider.forgetAuthentication, provider)
$q.when(result).finally(onlogout) $q.when(result).then(onlogout)
###* ###*
# @ngdoc method # @ngdoc method
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment