fix: logout supprime access_token cookie + bouton toujours visible
- Backend: delete_cookie access_token (/) + refresh_token - Logout ne requiert plus auth (graceful si token expire) - Bouton Deconnexion toujours visible dans le menu
This commit is contained in:
@@ -662,7 +662,6 @@
|
||||
id="logout-btn"
|
||||
type="button"
|
||||
role="menuitem"
|
||||
style="display:none"
|
||||
>
|
||||
<span
|
||||
class="menu-list-icon"
|
||||
|
||||
@@ -630,12 +630,9 @@ function initConfigModal() {
|
||||
});
|
||||
}
|
||||
|
||||
// Logout button
|
||||
// Logout button (always visible)
|
||||
var logoutBtn = document.getElementById("logout-btn");
|
||||
if (logoutBtn && AuthManager && AuthManager._authEnabled) {
|
||||
// Show if user is logged in
|
||||
var user = AuthManager.getCurrentUser();
|
||||
if (user) logoutBtn.style.display = '';
|
||||
if (logoutBtn) {
|
||||
logoutBtn.addEventListener("click", function() {
|
||||
if (confirm("Voulez-vous vraiment vous deconnecter ?")) {
|
||||
fetch("/api/auth/logout", { method: "POST" })
|
||||
|
||||
Reference in New Issue
Block a user