[UI] Incorrect redirect to MFA setup (#9896)

Fixes #9880
This commit is contained in:
Matthias Mair 2025-06-29 00:15:00 +02:00 committed by GitHub
parent ab5765685a
commit ce8ece4f10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 11 deletions

View File

@ -55,18 +55,9 @@ export async function fetchGlobalStates(
}
setApiDefaults();
await useServerApiState.getState().fetchServerApiState();
const result = await useUserSettingsState.getState().fetchSettings();
if (!result && navigate) {
console.log('MFA is required - setting up');
// call mfa setup
navigate('/mfa-setup');
return;
}
await Promise.all([
useServerApiState.getState().fetchServerApiState(),
useUserSettingsState.getState().fetchSettings(),
useGlobalSettingsState.getState().fetchSettings(),
useGlobalStatusState.getState().fetchStatus(),
useIconState.getState().fetchIcons()