Keep only Google quick login
Remove Kakao/Naver quick login buttons and config inputs, leaving Google as the sole provider in both main and fallback auth wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
31
script.js
31
script.js
@@ -29,8 +29,6 @@
|
||||
btnLogout: document.getElementById("btnLogout"),
|
||||
snsLogin: document.getElementById("snsLogin"),
|
||||
btnGoogle: document.getElementById("btnGoogle"),
|
||||
btnKakao: document.getElementById("btnKakao"),
|
||||
btnNaver: document.getElementById("btnNaver"),
|
||||
authModal: document.getElementById("authModal"),
|
||||
btnAuthClose: document.getElementById("btnAuthClose"),
|
||||
authForm: document.getElementById("authForm"),
|
||||
@@ -38,8 +36,6 @@
|
||||
authClientId: document.getElementById("authClientId"),
|
||||
authAllowedEmails: document.getElementById("authAllowedEmails"),
|
||||
authConnGoogle: document.getElementById("authConnGoogle"),
|
||||
authConnKakao: document.getElementById("authConnKakao"),
|
||||
authConnNaver: document.getElementById("authConnNaver"),
|
||||
btnAuthReset: document.getElementById("btnAuthReset"),
|
||||
modal: document.getElementById("modal"),
|
||||
btnClose: document.getElementById("btnClose"),
|
||||
@@ -375,6 +371,7 @@
|
||||
data.connections && typeof data.connections === "object"
|
||||
? {
|
||||
google: String(data.connections.google || "").trim(),
|
||||
// legacy keys kept for backward compatibility
|
||||
kakao: String(data.connections.kakao || "").trim(),
|
||||
naver: String(data.connections.naver || "").trim(),
|
||||
}
|
||||
@@ -470,14 +467,6 @@
|
||||
el.btnGoogle.hidden = !showQuick;
|
||||
el.btnGoogle.classList.toggle("is-disabled", !cfg.connections.google);
|
||||
}
|
||||
if (el.btnKakao) {
|
||||
el.btnKakao.hidden = !showQuick;
|
||||
el.btnKakao.classList.toggle("is-disabled", !cfg.connections.kakao);
|
||||
}
|
||||
if (el.btnNaver) {
|
||||
el.btnNaver.hidden = !showQuick;
|
||||
el.btnNaver.classList.toggle("is-disabled", !cfg.connections.naver);
|
||||
}
|
||||
}
|
||||
|
||||
function applyManageLock() {
|
||||
@@ -653,8 +642,6 @@
|
||||
el.authClientId.value = cfg.auth0.clientId || "";
|
||||
el.authAllowedEmails.value = (cfg.allowedEmails || []).join(", ");
|
||||
if (el.authConnGoogle) el.authConnGoogle.value = cfg.connections.google || "";
|
||||
if (el.authConnKakao) el.authConnKakao.value = cfg.connections.kakao || "";
|
||||
if (el.authConnNaver) el.authConnNaver.value = cfg.connections.naver || "";
|
||||
|
||||
el.authModal.hidden = false;
|
||||
document.body.style.overflow = "hidden";
|
||||
@@ -982,18 +969,6 @@
|
||||
if (!c) return openAuthModal();
|
||||
return loginWithConnection(c).catch(() => toast("로그인에 실패했습니다."));
|
||||
});
|
||||
if (el.btnKakao)
|
||||
el.btnKakao.addEventListener("click", () => {
|
||||
const c = getAuthConfig().connections.kakao;
|
||||
if (!c) return openAuthModal();
|
||||
return loginWithConnection(c).catch(() => toast("로그인에 실패했습니다."));
|
||||
});
|
||||
if (el.btnNaver)
|
||||
el.btnNaver.addEventListener("click", () => {
|
||||
const c = getAuthConfig().connections.naver;
|
||||
if (!c) return openAuthModal();
|
||||
return loginWithConnection(c).catch(() => toast("로그인에 실패했습니다."));
|
||||
});
|
||||
|
||||
if (el.btnAuthClose) el.btnAuthClose.addEventListener("click", closeAuthModal);
|
||||
if (el.authModal) {
|
||||
@@ -1026,8 +1001,6 @@
|
||||
.map((s) => s.trim().toLowerCase())
|
||||
.filter(Boolean);
|
||||
const connGoogle = el.authConnGoogle ? String(el.authConnGoogle.value || "").trim() : "";
|
||||
const connKakao = el.authConnKakao ? String(el.authConnKakao.value || "").trim() : "";
|
||||
const connNaver = el.authConnNaver ? String(el.authConnNaver.value || "").trim() : "";
|
||||
|
||||
if (!domain || !clientId) {
|
||||
toast("Domain과 Client ID를 입력하세요.");
|
||||
@@ -1036,7 +1009,7 @@
|
||||
|
||||
saveAuthOverride({
|
||||
auth0: { domain, clientId },
|
||||
connections: { google: connGoogle, kakao: connKakao, naver: connNaver },
|
||||
connections: { google: connGoogle },
|
||||
allowedEmails: emails,
|
||||
});
|
||||
toast("저장했습니다. 페이지를 새로고침합니다.");
|
||||
|
||||
Reference in New Issue
Block a user