SAVuegram
SAVuegram copied to clipboard
Update Login.vue
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.
^ Thank you @puf! works