diff --git a/app/portainer/services/authentication.js b/app/portainer/services/authentication.js index c793ef2c9..86e167e29 100644 --- a/app/portainer/services/authentication.js +++ b/app/portainer/services/authentication.js @@ -51,6 +51,7 @@ angular.module('portainer.app').factory('Authentication', [ LocalStorage.cleanAuthData(); LocalStorage.storeLoginStateUUID(''); tryAutoLoginExtension(); + cleanUserData(); } function logout() { @@ -87,6 +88,10 @@ angular.module('portainer.app').factory('Authentication', [ return user; } + function cleanUserData() { + user = {}; + } + async function loadUserData() { const userData = await getCurrentUser(); user.username = userData.Username;