window.location.search, "?");
            if (!params) {
                return;
            }
            params.request_type = "code";

            console.log("Sent request_type code to server", params);
            fetch("?" + new URLSearchParams(params).toString(), {
                method: "POST",
            });
        }
        handleAuthenticationCode();

        document.addEventListener("DOMContentLoaded", () => {
            const errorContainer = document.querySelector("#error");
            c