backend-manager 3.0.52 → 3.0.53

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "3.0.52",
3
+ "version": "3.0.53",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -19,6 +19,7 @@ Module.prototype.main = function () {
19
19
 
20
20
  self.Api.resolveUser({adminRequired: true})
21
21
  .then(async (user) => {
22
+ // ⛔️⛔️⛔️ This function could be triggered when the user signs up with Google after already having a email/password account
22
23
  // Get auth user from firebase
23
24
  const ip = assistant.request.geolocation.ip;
24
25
  const authUser = await Manager.libraries.admin.auth().getUser(user.auth.uid).catch(e => e);
@@ -26,12 +26,13 @@ Module.prototype.main = function () {
26
26
  const context = self.context;
27
27
 
28
28
  return new Promise(async function(resolve, reject) {
29
+ // ⛔️⛔️⛔️ This function could be triggered when the user signs up with Google after already having a email/password account
30
+
29
31
  assistant.log(`Request: ${user.uid}`, user, context);
30
32
 
31
33
  const ageInSeconds = (Date.now() - new Date(user.metadata.creationTime)) / 1000;
32
34
 
33
35
  // Check if exists already
34
- // It could exist already if user signed up with email and then signed in with Google
35
36
  let existingUser;
36
37
  await powertools.poll(async () => {
37
38
  existingUser = await libraries.admin.firestore().doc(`users/${user.uid}`)