From f025794a2754296ebea87a61b7d772b73d1f0464 Mon Sep 17 00:00:00 2001 From: ByakuraRinne Date: Thu, 20 Feb 2025 00:22:01 +0100 Subject: [PATCH] V1.7 --- Files/background.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) {