Remove adminSecret from client, move to server-side only
This commit is contained in:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user