From 46e9761caee1e2dba776a13af363e8b064f1879b Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 3 Apr 2025 21:43:32 -0400 Subject: [PATCH] =?UTF-8?q?Add=20click=20event=20listener=20to=20the=20?= =?UTF-8?q?=E2=80=9CoidcLoginBtn=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/auth.js b/auth.js index 609857d..166ee9a 100644 --- a/auth.js +++ b/auth.js @@ -400,6 +400,13 @@ document.addEventListener("DOMContentLoaded", function () { disableBasicAuth: localStorage.getItem("disableBasicAuth") === "true", disableOIDCLogin: localStorage.getItem("disableOIDCLogin") === "true" }); + const oidcLoginBtn = document.getElementById("oidcLoginBtn"); + if (oidcLoginBtn) { + oidcLoginBtn.addEventListener("click", () => { + // Redirect to the OIDC auth endpoint. The endpoint can be adjusted if needed. + window.location.href = "auth.php?oidc=initiate"; + }); + } }); export { initAuth, checkAuthentication }; \ No newline at end of file