diff --git a/Files/background.js b/Files/background.js index 6295929..83695c7 100644 --- a/Files/background.js +++ b/Files/background.js @@ -4,6 +4,7 @@ async function login(username, password) { const authHeader = "Basic " + btoa(username + ":" + password); try { + console.log("Sending request to SOGo API..."); const response = await fetch("https://mail.pandem.fr/SOGo/so/session", { method: "POST", headers: { @@ -12,13 +13,15 @@ async function login(username, password) { } }); - console.log("Response status:", response.status); // Debugging + console.log("Response received:", response); if (response.ok) { console.log("Login successful"); return true; } else { - console.log("Login failed"); + console.log("Login failed with status:", response.status, response.statusText); + const errorText = await response.text(); + console.log("Response body:", errorText); return false; } } catch (error) {