fix: keep session on frontend load
This commit is contained in:
@@ -648,8 +648,12 @@ createApp({
|
|||||||
else stopTimer();
|
else stopTimer();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// keep session token in localStorage; do not force logout on load
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
logout();
|
if (localStorage.getItem('t')) {
|
||||||
|
loggedIn.value = true;
|
||||||
|
refreshAll();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user