SAVuegram icon indicating copy to clipboard operation
SAVuegram copied to clipboard

Update Login.vue

Open puf opened this issue 7 years ago • 1 comments

There was a breaking change in v5 of the Firebase Authentication SDK. Many developers use this code, but are then confused about errors when user.uid doesn't exist. I proposed a comment here, but an alternative is to use code that works in both cases, e.g.:

 if (user && !user.uid) user = user.user;

It's a bit cryptic, but pulls the user from within the AuthCredential if needed.

puf avatar Nov 27 '18 15:11 puf

^ Thank you @puf! works

hermuxo avatar Feb 02 '19 15:02 hermuxo