Remove adminSecret from client, move to server-side only

This commit is contained in:
Sterling Archer
2026-06-18 16:25:59 -07:00
parent ca45f26746
commit b3bb2f13b7
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -8,7 +8,6 @@ window.STEPMATES_CONFIG = {
appId: "1:334532615980:web:84cd9b35341dda869fd689"
},
webhookBase: "https://webhook-mgc3i5pbxq-uc.a.run.app",
adminNotifyUrl: "https://us-central1-step-tracker-bfd5c.cloudfunctions.net/adminNotify",
adminSecret: "YOUR_ADMIN_SECRET",
adminNotifyUrl: "https://adminnotify-mgc3i5pbxq-uc.a.run.app",
appUrl: "https://justinoros.github.io/step-tracker"
};
+1 -1
View File
@@ -1676,7 +1676,7 @@ async function initUser(user) {
async function notifyAdminOfNewUser(email, uid) {
try {
await fetch(`${window.STEPMATES_CONFIG.adminNotifyUrl}?uid=${uid}&email=${encodeURIComponent(email)}&secret=${window.STEPMATES_CONFIG.adminSecret}`);
await fetch(`${window.STEPMATES_CONFIG.adminNotifyUrl}?uid=${uid}&email=${encodeURIComponent(email)}`);
} catch(e) {
console.warn('Admin notify failed', e);
}