summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLei YU <yulei.sh@bytedance.com>2021-08-06 12:12:29 +0300
committerDixsie Wolmers <dixsiew@gmail.com>2021-12-20 08:15:28 +0300
commita5fefd0ad25753e5f7da03d77dfe7fe10255ebb6 (patch)
tree0189a2ced047a396b3a1127c302ec5b67fa2a6af /src
parent14172d745cec46a6ad4cce61eb02df962eb4f309 (diff)
downloadwebui-vue-a5fefd0ad25753e5f7da03d77dfe7fe10255ebb6.tar.xz
[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 <yulei.sh@bytedance.com> Change-Id: I01e3ab5ca63baed18045915500fa8ca2e6b247ea
Diffstat (limited to 'src')
-rw-r--r--src/store/modules/Authentication/AuthenticanStore.js4
1 files changed, 2 insertions, 2 deletions
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));