From d1b34494be73f77831de03ce1f5d8d020ee62f00 Mon Sep 17 00:00:00 2001 From: Konstantin Kolesnyak Date: Mon, 27 Jul 2026 12:42:13 +0200 Subject: [PATCH] web: clear `checking` on the passwordless auto-login path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `checking` starts true whenever there is no stored token, and App renders null while it is true. Every branch of checkAuth() clears it except the auto-login one taken when the server reports auth_required: false — so on a deployment with no password configured, a fresh browser logs in and then sits on a blank page until a manual reload seeds a token and skips the check entirely. --- web/src/stores/authStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/stores/authStore.ts b/web/src/stores/authStore.ts index 83019320..9c1c9a6b 100644 --- a/web/src/stores/authStore.ts +++ b/web/src/stores/authStore.ts @@ -45,7 +45,9 @@ export const useAuthStore = create((set) => ({ // No password configured — auto-login const { token } = await api.login(''); setToken(token); - set({ authenticated: true }); + // checking must be cleared here too — App renders null while it + // is true, so leaving it set blanks the app after auto-login. + set({ authenticated: true, checking: false }); return; } } catch {