From 543a20d70b2e86dcdb11db90a13e568968c773a5 Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Tue, 16 Apr 2024 14:07:36 +0300 Subject: [PATCH] fix: clear remembered credentials on "remember" unckeck [WTEL-4374] --- src/store/modules/auth/auth.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/store/modules/auth/auth.js b/src/store/modules/auth/auth.js index 9cbe432c..d2113a0e 100644 --- a/src/store/modules/auth/auth.js +++ b/src/store/modules/auth/auth.js @@ -97,6 +97,10 @@ const actions = { if (context.state.username) localStorage.setItem('auth/username', context.state.username); if (context.state.password) localStorage.setItem('auth/password', context.state.password); localStorage.setItem('auth/rememberCredentials', 'true'); + } else { + localStorage.removeItem('auth/username'); + localStorage.removeItem('auth/password'); + localStorage.removeItem('auth/rememberCredentials'); } },