From 83ebab0514d30c98bc0ebafc24b397e5daf338b3 Mon Sep 17 00:00:00 2001 From: Sterling Archer Date: Thu, 18 Jun 2026 22:10:02 -0700 Subject: [PATCH] Fix permissions error on sign-in by removing unauthenticated Firestore query --- index.html | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/index.html b/index.html index a349140..3c95c0c 100644 --- a/index.html +++ b/index.html @@ -1323,19 +1323,6 @@ window.sendMagicLink = async function() { } try { - const usersQ = query(collection(db, 'users'), where('email', '==', email.toLowerCase())); - const usersSnap = await getDocs(usersQ); - const isExisting = !usersSnap.empty; - - if (!isExisting && inviteToken && inviteFrom) { - document.getElementById('auth-card').style.display = 'none'; - document.getElementById('magic-sent-card').style.display = 'block'; - document.getElementById('magic-sent-email').textContent = email; - btn.disabled = false; btn.innerHTML = 'Continue with Email'; - await notifyAdminOfNewUser(email, 'pending-' + email); - return; - } - const res = await fetch(`${window.STEPMATES_CONFIG.sendMagicLinkUrl}?email=${encodeURIComponent(email)}`); const data = await res.json(); if (!res.ok) throw new Error(data.error || 'Failed to send');