Skip to content

Commit 0b56051

Browse files
committed
Call destroy in sync object to avoid getting error message when logging in a second time with different service
1 parent 4fabf3c commit 0b56051

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/scripts/services/CurrentUser.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ angular.module('neo4jApp.services')
141141
logout: ->
142142
$rootScope.currentUser = null
143143
NTN.logout()
144+
@store.unauth()
144145
localStorageService.remove 'ntn_token'
145146
localStorageService.remove 'ntn_data_token'
146147
localStorageService.remove 'ntn_refresh_token'

app/scripts/services/NTN.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ angular.module('neo4jApp.services')
118118
logout: ->
119119
auth.signout()
120120
_unbind()
121-
_sync_object = {}
121+
_sync_object.$destroy()
122122
authenticate: (profile, token) ->
123123
auth.authenticate(profile, token).then(-> _unbind())
124124
isAuthenticated: -> auth.isAuthenticated

0 commit comments

Comments
 (0)