Fix in auth

This commit is contained in:
2023-04-19 11:44:00 +02:00
parent 5a81cb64f5
commit 710cad376e
2 changed files with 9 additions and 7 deletions

View File

@@ -4,14 +4,14 @@
$: loginRendered = false;
onMount(() => {
onMount(async () => {
try {
userstore.loginFromStorage();
await userstore.loginFromStorage();
loginRendered = true;
} catch (error) {
console.log(error);
userstore.logout();
location.replace(`${location.pathname}/login`);
location.replace(`/login`);
}
});
</script>