Avoid UI flickering when autologin token is used in login view
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user