Fix bugs with switching accounts

This commit is contained in:
Natsumi
2025-08-27 11:45:37 +12:00
parent 23053c1339
commit d92818edea
3 changed files with 20 additions and 7 deletions

View File

@@ -823,7 +823,7 @@ export const useAuthStore = defineStore('Auth', () => {
'Primary password is enabled, this disables auto login.'
);
state.attemptingAutoLogin = false;
logout();
handleLogoutEvent();
return;
}
const attemptsInLastHour = Array.from(state.autoLoginAttempts).filter(
@@ -834,7 +834,7 @@ export const useAuthStore = defineStore('Auth', () => {
'More than 3 auto login attempts within the past hour, logging out instead of attempting auto login.'
);
state.attemptingAutoLogin = false;
logout();
handleLogoutEvent();
return;
}
state.autoLoginAttempts.add(new Date().getTime());