Remove adminSecret from client, move to server-side only
This commit is contained in:
1 parent
ca45f26746
commit
b3bb2f13b7
2 files changed
+2
-3
No files matched your search
@@ -8,7 +8,6 @@ window.STEPMATES_CONFIG = {
|
|||||||
appId: "1:334532615980:web:84cd9b35341dda869fd689"
|
appId: "1:334532615980:web:84cd9b35341dda869fd689"
|
||||||
},
|
},
|
||||||
webhookBase: "https://webhook-mgc3i5pbxq-uc.a.run.app",
|
webhookBase: "https://webhook-mgc3i5pbxq-uc.a.run.app",
|
||||||
adminNotifyUrl: "https://us-central1-step-tracker-bfd5c.cloudfunctions.net/adminNotify",
|
adminNotifyUrl: "https://adminnotify-mgc3i5pbxq-uc.a.run.app",
|
||||||
adminSecret: "YOUR_ADMIN_SECRET",
|
|
||||||
appUrl: "https://justinoros.github.io/step-tracker"
|
appUrl: "https://justinoros.github.io/step-tracker"
|
||||||
};
|
};
|
||||||
+1
-1
@@ -1676,7 +1676,7 @@ async function initUser(user) {
|
|||||||
|
|
||||||
async function notifyAdminOfNewUser(email, uid) {
|
async function notifyAdminOfNewUser(email, uid) {
|
||||||
try {
|
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) {
|
} catch(e) {
|
||||||
console.warn('Admin notify failed', e);
|
console.warn('Admin notify failed', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user