Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140131

Promise doesn't resolve completely when i am using google-Authentication?

$
0
0

when I am running this code then it prints the results but doesn't exit or completely and it prints the output correctly. here finalArray is the array of phone Numbers. and this is inside an async function and i have to used this inside an async function because I have to perform other queries.

const update = async() => {
const getAuth = async phoneNumber => {
    return auth.getUserByPhoneNumber(phoneNumber).catch(() => {
      return {
        phoneNumber,
        uid: null,
        email: '',
        displayName: '',
        emailVerified,
        disabled,
      };
    });
  };

  const creatorRecords = await Promise.all(
    finalArray.map(phoneNumbercreator => {
      return getAuth(phoneNumbercreator);
    }),
  );
 }

Viewing all articles
Browse latest Browse all 140131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>