Skip to content

Commit 3969898

Browse files
authored
fix: clear logout state immediately
Merged by MergeOS maintainer after CI and code review. Linked bounty issue remains open for tracking and payout review; visual evidence can still be attached for payout completeness.
1 parent 56bfdfd commit 3969898

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

frontend/src/App.vue

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4974,15 +4974,17 @@ async function restoreSession() {
49744974
}
49754975
49764976
async function logout() {
4977-
try {
4978-
await api('/api/auth/logout', { method: 'POST', body: JSON.stringify({}) });
4979-
} finally {
4980-
clearSession();
4981-
publicModeVisible.value = true;
4982-
publicPage.value = 'home';
4983-
updatePublicBrowserPath('home', true);
4984-
showToast('Logged out.');
4985-
}
4977+
const req = api('/api/auth/logout', { method: 'POST', body: JSON.stringify({}) }).catch((err) => {
4978+
console.warn('Backend logout failed gracefully', err);
4979+
});
4980+
4981+
clearSession();
4982+
publicModeVisible.value = true;
4983+
publicPage.value = 'home';
4984+
updatePublicBrowserPath('home', true);
4985+
showToast('Logged out.');
4986+
4987+
await req;
49864988
}
49874989
49884990
onMounted(async () => {

0 commit comments

Comments
 (0)