Fix post-login/setup navigation: use hard redirect instead of goto
Some checks failed
Validate / Hassfest (push) Has been cancelled
Some checks failed
Validate / Hassfest (push) Has been cancelled
goto('/') races with layout's onMount auth check, causing redirect
back to /login. Use window.location.href for full page reload which
re-initializes layout with authenticated state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
submitting = true;
|
||||
try {
|
||||
await login(username, password);
|
||||
goto('/');
|
||||
window.location.href = '/';
|
||||
} catch (err: any) {
|
||||
error = err.message || 'Login failed';
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
submitting = true;
|
||||
try {
|
||||
await setup(username, password);
|
||||
goto('/');
|
||||
window.location.href = '/';
|
||||
} catch (err: any) { error = err.message || 'Setup failed'; }
|
||||
submitting = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user