[Vuejs]-How do i combine asynchronous js with vuex store?

0👍

That’s because you are returning directly your store data from authenticate(), not the promise chain.
So you are not waiting your auth.signInWithPopup but resolve directly the current value of your store.

try to returning directly auth.signInWithPopup(provider) and return your userData from the resolve callback or via an other "then" after your catch.

But it might not be a good idea to mix async/await with .then.catch.
It’s error prone.

Leave a comment