backend-manager 3.2.29 → 3.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -595,15 +595,16 @@ BackendAssistant.prototype.authenticate = async function (options) {
|
|
|
595
595
|
self.request.user.roles.admin = true;
|
|
596
596
|
return _resolve(self.request.user);
|
|
597
597
|
}
|
|
598
|
-
} else if (options.apiKey) {
|
|
599
|
-
|
|
598
|
+
} else if (options.apiKey || data.apiKey) {
|
|
599
|
+
const apiKey = apiKey || data.apiKey;
|
|
600
|
+
self.log('Found "options.apiKey"', apiKey, logOptions);
|
|
600
601
|
|
|
601
|
-
if (
|
|
602
|
+
if (apiKey.includes('test')) {
|
|
602
603
|
return _resolve(self.request.user);
|
|
603
604
|
}
|
|
604
605
|
|
|
605
606
|
await admin.firestore().collection(`users`)
|
|
606
|
-
.where('api.privateKey', '==',
|
|
607
|
+
.where('api.privateKey', '==', apiKey)
|
|
607
608
|
.get()
|
|
608
609
|
.then(function(querySnapshot) {
|
|
609
610
|
querySnapshot.forEach(function(doc) {
|