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:
16
index.html
16
index.html
@@ -28,11 +28,9 @@
|
|||||||
domain: "",
|
domain: "",
|
||||||
clientId: "",
|
clientId: "",
|
||||||
},
|
},
|
||||||
// Auth0 connection 이름(선택). 예: google-oauth2 / kakao / naver
|
// Auth0 connection 이름(선택). 예: google-oauth2
|
||||||
connections: {
|
connections: {
|
||||||
google: "",
|
google: "",
|
||||||
kakao: "",
|
|
||||||
naver: "",
|
|
||||||
},
|
},
|
||||||
// 관리 허용 이메일(대소문자 무시)
|
// 관리 허용 이메일(대소문자 무시)
|
||||||
allowedEmails: [],
|
allowedEmails: [],
|
||||||
@@ -86,12 +84,6 @@
|
|||||||
<div class="sns-login" id="snsLogin">
|
<div class="sns-login" id="snsLogin">
|
||||||
<span class="sns-label">간편로그인</span>
|
<span class="sns-label">간편로그인</span>
|
||||||
<div class="sns-row">
|
<div class="sns-row">
|
||||||
<button class="sns-btn sns-naver is-disabled" id="btnNaver" type="button" aria-label="네이버로 로그인">
|
|
||||||
<span class="sns-letter">N</span>
|
|
||||||
</button>
|
|
||||||
<button class="sns-btn sns-kakao is-disabled" id="btnKakao" type="button" aria-label="카카오로 로그인">
|
|
||||||
<span class="sns-kakao-bubble" aria-hidden="true"></span>
|
|
||||||
</button>
|
|
||||||
<button class="sns-btn sns-google is-disabled" id="btnGoogle" type="button" aria-label="구글로 로그인">
|
<button class="sns-btn sns-google is-disabled" id="btnGoogle" type="button" aria-label="구글로 로그인">
|
||||||
<span class="sns-google-g">G</span>
|
<span class="sns-google-g">G</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -231,9 +223,7 @@
|
|||||||
<label class="field">
|
<label class="field">
|
||||||
<span class="field-label">Connection 이름(선택)</span>
|
<span class="field-label">Connection 이름(선택)</span>
|
||||||
<input id="authConnGoogle" class="input" type="text" placeholder="Google 예: google-oauth2" />
|
<input id="authConnGoogle" class="input" type="text" placeholder="Google 예: google-oauth2" />
|
||||||
<input id="authConnKakao" class="input" type="text" placeholder="Kakao 예: kakao" />
|
<div class="hint">Auth0에서 설정한 Google connection 이름입니다. (보통 `google-oauth2`)</div>
|
||||||
<input id="authConnNaver" class="input" type="text" placeholder="Naver 예: naver" />
|
|
||||||
<div class="hint">Auth0에서 설정한 connection 이름입니다. 비우면 “로그인” 버튼으로 통합 로그인 화면을 띄웁니다.</div>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="modal-foot">
|
<div class="modal-foot">
|
||||||
@@ -925,8 +915,6 @@
|
|||||||
applyTheme(cur === "dark" ? "light" : "dark");
|
applyTheme(cur === "dark" ? "light" : "dark");
|
||||||
});
|
});
|
||||||
|
|
||||||
if (el.btnNaver) el.btnNaver.addEventListener("click", () => loginWithConnection("naver").catch(() => toast("로그인에 실패했습니다.")));
|
|
||||||
if (el.btnKakao) el.btnKakao.addEventListener("click", () => loginWithConnection("kakao").catch(() => toast("로그인에 실패했습니다.")));
|
|
||||||
if (el.btnGoogle) el.btnGoogle.addEventListener("click", () => loginWithConnection("google").catch(() => toast("로그인에 실패했습니다.")));
|
if (el.btnGoogle) el.btnGoogle.addEventListener("click", () => loginWithConnection("google").catch(() => toast("로그인에 실패했습니다.")));
|
||||||
if (el.btnLogout) el.btnLogout.addEventListener("click", () => logout().catch(() => toast("로그아웃에 실패했습니다.")));
|
if (el.btnLogout) el.btnLogout.addEventListener("click", () => logout().catch(() => toast("로그아웃에 실패했습니다.")));
|
||||||
|
|
||||||
|
|||||||
31
script.js
31
script.js
@@ -29,8 +29,6 @@
|
|||||||
btnLogout: document.getElementById("btnLogout"),
|
btnLogout: document.getElementById("btnLogout"),
|
||||||
snsLogin: document.getElementById("snsLogin"),
|
snsLogin: document.getElementById("snsLogin"),
|
||||||
btnGoogle: document.getElementById("btnGoogle"),
|
btnGoogle: document.getElementById("btnGoogle"),
|
||||||
btnKakao: document.getElementById("btnKakao"),
|
|
||||||
btnNaver: document.getElementById("btnNaver"),
|
|
||||||
authModal: document.getElementById("authModal"),
|
authModal: document.getElementById("authModal"),
|
||||||
btnAuthClose: document.getElementById("btnAuthClose"),
|
btnAuthClose: document.getElementById("btnAuthClose"),
|
||||||
authForm: document.getElementById("authForm"),
|
authForm: document.getElementById("authForm"),
|
||||||
@@ -38,8 +36,6 @@
|
|||||||
authClientId: document.getElementById("authClientId"),
|
authClientId: document.getElementById("authClientId"),
|
||||||
authAllowedEmails: document.getElementById("authAllowedEmails"),
|
authAllowedEmails: document.getElementById("authAllowedEmails"),
|
||||||
authConnGoogle: document.getElementById("authConnGoogle"),
|
authConnGoogle: document.getElementById("authConnGoogle"),
|
||||||
authConnKakao: document.getElementById("authConnKakao"),
|
|
||||||
authConnNaver: document.getElementById("authConnNaver"),
|
|
||||||
btnAuthReset: document.getElementById("btnAuthReset"),
|
btnAuthReset: document.getElementById("btnAuthReset"),
|
||||||
modal: document.getElementById("modal"),
|
modal: document.getElementById("modal"),
|
||||||
btnClose: document.getElementById("btnClose"),
|
btnClose: document.getElementById("btnClose"),
|
||||||
@@ -375,6 +371,7 @@
|
|||||||
data.connections && typeof data.connections === "object"
|
data.connections && typeof data.connections === "object"
|
||||||
? {
|
? {
|
||||||
google: String(data.connections.google || "").trim(),
|
google: String(data.connections.google || "").trim(),
|
||||||
|
// legacy keys kept for backward compatibility
|
||||||
kakao: String(data.connections.kakao || "").trim(),
|
kakao: String(data.connections.kakao || "").trim(),
|
||||||
naver: String(data.connections.naver || "").trim(),
|
naver: String(data.connections.naver || "").trim(),
|
||||||
}
|
}
|
||||||
@@ -470,14 +467,6 @@
|
|||||||
el.btnGoogle.hidden = !showQuick;
|
el.btnGoogle.hidden = !showQuick;
|
||||||
el.btnGoogle.classList.toggle("is-disabled", !cfg.connections.google);
|
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() {
|
function applyManageLock() {
|
||||||
@@ -653,8 +642,6 @@
|
|||||||
el.authClientId.value = cfg.auth0.clientId || "";
|
el.authClientId.value = cfg.auth0.clientId || "";
|
||||||
el.authAllowedEmails.value = (cfg.allowedEmails || []).join(", ");
|
el.authAllowedEmails.value = (cfg.allowedEmails || []).join(", ");
|
||||||
if (el.authConnGoogle) el.authConnGoogle.value = cfg.connections.google || "";
|
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;
|
el.authModal.hidden = false;
|
||||||
document.body.style.overflow = "hidden";
|
document.body.style.overflow = "hidden";
|
||||||
@@ -982,18 +969,6 @@
|
|||||||
if (!c) return openAuthModal();
|
if (!c) return openAuthModal();
|
||||||
return loginWithConnection(c).catch(() => toast("로그인에 실패했습니다."));
|
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.btnAuthClose) el.btnAuthClose.addEventListener("click", closeAuthModal);
|
||||||
if (el.authModal) {
|
if (el.authModal) {
|
||||||
@@ -1026,8 +1001,6 @@
|
|||||||
.map((s) => s.trim().toLowerCase())
|
.map((s) => s.trim().toLowerCase())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
const connGoogle = el.authConnGoogle ? String(el.authConnGoogle.value || "").trim() : "";
|
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) {
|
if (!domain || !clientId) {
|
||||||
toast("Domain과 Client ID를 입력하세요.");
|
toast("Domain과 Client ID를 입력하세요.");
|
||||||
@@ -1036,7 +1009,7 @@
|
|||||||
|
|
||||||
saveAuthOverride({
|
saveAuthOverride({
|
||||||
auth0: { domain, clientId },
|
auth0: { domain, clientId },
|
||||||
connections: { google: connGoogle, kakao: connKakao, naver: connNaver },
|
connections: { google: connGoogle },
|
||||||
allowedEmails: emails,
|
allowedEmails: emails,
|
||||||
});
|
});
|
||||||
toast("저장했습니다. 페이지를 새로고침합니다.");
|
toast("저장했습니다. 페이지를 새로고침합니다.");
|
||||||
|
|||||||
Reference in New Issue
Block a user