From a5fefd0ad25753e5f7da03d77dfe7fe10255ebb6 Mon Sep 17 00:00:00 2001 From: Lei YU Date: Fri, 6 Aug 2021 17:12:29 +0800 Subject: [POC] login: Fix waiting in login page after login When the user enter the correct username/password and click the "Log in" button, sometimes the page stays at the login page. The user will have to reload the page, enter the username/password, and click the "Log in" button again to actually login the WebUI. From the browser's debug control, we could see it's waiting for the response of https://$bmc/redfish/v1/AccountService/Accounts/root and it does not get any response. From the BMC side, we could see the first login is successful. Somehow if we remove the async keyword of function checkPasswordChangeRequired(), the issue is not reproduced anymore. So this is a POC patch to fix the issue, but the root cause is unknown. Tested: Clear the browser's cookie, successful login multiple times. Signed-off-by: Lei YU Change-Id: I01e3ab5ca63baed18045915500fa8ca2e6b247ea --- src/store/modules/Authentication/AuthenticanStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/store/modules') diff --git a/src/store/modules/Authentication/AuthenticanStore.js b/src/store/modules/Authentication/AuthenticanStore.js index e08f5b03..07d5ee8b 100644 --- a/src/store/modules/Authentication/AuthenticanStore.js +++ b/src/store/modules/Authentication/AuthenticanStore.js @@ -52,8 +52,8 @@ const AuthenticationStore = { .then(() => router.go('/login')) .catch((error) => console.log(error)); }, - async checkPasswordChangeRequired(_, username) { - return await api + checkPasswordChangeRequired(_, username) { + api .get(`/redfish/v1/AccountService/Accounts/${username}`) .then(({ data: { PasswordChangeRequired } }) => PasswordChangeRequired) .catch((error) => console.log(error)); -- cgit v1.2.3