Skip to content

Commit

Permalink
odapiclient always removeItem abcdesktop_jwt_user_token
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely committed Apr 30, 2024
1 parent aa18984 commit 4755f65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions js/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,10 @@ class LoginProgress {
export function docker_logoff() {
return logout().always((logoutresult) => {
// always delete jwt_user_token
localStorage.removeItem('abcdesktop_jwt_user_token');
// odapi does the localStorage.removeItem('abcdesktop_jwt_user_token');
//
window.od.currentUser = null;
//window.Cookies.remove('abcdesktop_token', { path: '/API' });
window.Cookies.remove('abcdesktop_token', { path: '/API' });
// remove loadbalancing cookie
window.Cookies.remove('abcdesktop_host');
// Do not reload the default page if manager and provider is defined
Expand Down
2 changes: 1 addition & 1 deletion js/odapiclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const odApiClient = new (class ODApiClient {

logout(data_dict) {
return client.sendRequest('auth/logout', data_dict)
.then((res) => {
.always((res) => {
localStorage.removeItem('abcdesktop_jwt_user_token');
return res;
});
Expand Down

0 comments on commit 4755f65

Please sign in to comment.