Avoid UI flickering when autologin token is used in login view

This commit is contained in:
Johannes Zellner
2025-05-13 09:16:16 +02:00
parent 87f9837939
commit cb7e54acaf
+2 -3
View File
@@ -71,9 +71,8 @@ onMounted(async () => {
localStorage.removeItem('cloudronFirstTimeToken');
try {
const res = await fetcher.post(submitUrl, { autoLoginToken });
if (res.body.redirectTo) window.location.href = res.body.redirectTo;
else console.log('login success but missing redirectTo in data:', res.body);
window.location.href = res.body.redirectTo || '/';
return;
} catch (error) {
console.error('Failed to use autologin token', error);
}