Skip to content

web: clear checking on the passwordless auto-login path - #232

Open
constkolesnyak wants to merge 1 commit into
ClickHouse:mainfrom
constkolesnyak:fix/web-auth-checking-flag-v2
Open

web: clear checking on the passwordless auto-login path#232
constkolesnyak wants to merge 1 commit into
ClickHouse:mainfrom
constkolesnyak:fix/web-auth-checking-flag-v2

Conversation

@constkolesnyak

Copy link
Copy Markdown
Contributor

What

On a deployment with no password configured, a fresh browser loads the web UI, auto-logs in, and then sits on a blank page. A manual reload fixes it.

The root cause: checking starts as !getToken() (true for any browser without a stored token), so App.tsx renders null while it is set. The checkAuth() branch that handles the passwordless auto-login path sets authenticated: true but never clears checking, leaving the app stuck on a blank screen after a successful login.

Fix

Clear checking: false alongside authenticated: true in the auto-login branch.

Why

Correct UX — the app should render immediately after auto-login on a passwordless instance.

Rebased on current upstream/main (2026-07-30).

`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant