Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4533,10 +4533,20 @@ async function restoreSession() {
}

async function logout() {
// Use direct fetch to avoid 401 loop when token is expired
try {
await api('/api/auth/logout', { method: 'POST', body: JSON.stringify({}) });
await fetch('/api/auth/logout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' }
});
} catch {
// Backend logout may fail if token expired, continue anyway
} finally {
clearSession();
publicPage.value = 'home';
projectWizardVisible.value = false;
dashboardSearch.value = '';
selectedDashboardProjectID.value = '';
showToast('Logged out.');
}
}
Expand Down