From e65f83c2461f7510b49f7a95817396a6201e2905 Mon Sep 17 00:00:00 2001 From: Manoj Kumar Date: Fri, 4 Sep 2026 10:19:36 +0530 Subject: [PATCH] dont show unathorized notification for prelogin --- ui/src/utils/request.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/src/utils/request.js b/ui/src/utils/request.js index 2317aac04465..f76a9e8884e2 100644 --- a/ui/src/utils/request.js +++ b/ui/src/utils/request.js @@ -51,7 +51,9 @@ const err = (error) => { }) } if (response.status === 401) { - if (response.config && response.config.params && ['forgotPassword', 'listIdps', 'cloudianIsEnabled'].includes(response.config.params.command)) { + const requestCommand = (response.config && response.config.params && response.config.params.command) || + (response.config && typeof response.config.data === 'string' && new URLSearchParams(response.config.data).get('command')) + if (['forgotPassword', 'listIdps', 'cloudianIsEnabled'].includes(requestCommand)) { return } const originalPath = router.currentRoute.value.path @@ -75,9 +77,9 @@ const err = (error) => { } } } - countNotify++ - store.commit('SET_COUNT_NOTIFY', countNotify) if (originalPath === '/verify2FA' || originalPath === '/setup2FA') { + countNotify++ + store.commit('SET_COUNT_NOTIFY', countNotify) notification.error({ top: '65px', message: i18n.global.t('label.2FA'), @@ -90,7 +92,9 @@ const err = (error) => { store.commit('SET_COUNT_NOTIFY', countNotify) } }) - } else { + } else if (originalPath !== '/user/login') { + countNotify++ + store.commit('SET_COUNT_NOTIFY', countNotify) notification.error({ top: '65px', message: i18n.global.t('label.unauthorized'),