const sendSignInLinkToEmailBtn = document.getElementById("sendSignInLinkToEmailBtn");…
Jump to turn (11)
- 1const sendSignInLinkToEmailBtn = document.getElementById("sendSignInLinkToEmailB
- 2한글로
- 3이메일 링크 클릭 시 연결할 URL 을 electron app으로 지정하고 싶어
- 4도메인 화이트리스트 에러
- 5너가작성해준 너의 말대로 코드 수정해줘
- 6저렇게하면 화이트 오류뜬다고
- 7어떻게해
- 8"file:///path/to/your/electron/app/main.html" 이거는 파이어베이스에서 도메인 추가가안되
- 9이게 맞을 확률 몇%야?
- 10dynamic links 말고 다른방법
- 11const sendSignInLinkToEmailBtn = document.getElementById("sendSignInLinkToEmailB
- User
const sendSignInLinkToEmailBtn = document.getElementById("sendSignInLinkToEmailBtn");
sendSignInLinkToEmailBtn.addEventListener("click", (event) => { event.preventDefault(); // 폼 제출 이벤트 취소
const email = document.getElementById("signInEmail").value; // 이메일 입력란의 값을 가져옴
const actionCodeSettings = { url: "http://localhost:3000/main", // 이메일 링크 클릭 시 연결할 URL handleCodeInApp: true, // 앱에서 코드 확인 여부 };
sendSignInLinkToEmail(auth, email, actionCodeSettings) .then(() => { // 이메일 링크 전송 성공 console.log("이메일 링크가 전송되었습니다."); }) .catch((error) => { // 이메일 링크 전송 실패 console.error(error); }); });
// 이메일 링크 확인 const url = window.location.href; const email = window.localStorage.getItem('emailForSignIn');
if (isSignInWithEmailLink(auth, url)) { signInWithEmailLink(auth, email, url) .then((result) => { // 로그인 성공 console.log("로그인 성공"); // 메인 페이지로 이동 location.href = "src/renderer/splash.html"; }) .catch((error) => { console.log("로그인 실패"); console.error(error); }); }
- Assistant