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

Handle sign out failure

parent 1db1463d
......@@ -22,9 +22,11 @@ configure = [
]
identityProvider.forgetAuthentication = [
'session',
(session) ->
session.logout({}).$promise
'flash', 'session',
(flash, session) ->
session.logout({}).$promise.catch (err) ->
flash 'error', 'Sign out failed!'
throw err
]
identityProvider.requestAuthentication = [
......
......@@ -66,7 +66,7 @@ identityProvider = ->
###
logout: ->
result = $injector.invoke(provider.forgetAuthentication, provider)
$q.when(result).finally(onlogout)
$q.when(result).then(onlogout)
###*
# @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