My function for updating the profile URL using the reload method is not reflecting changes in my computed property.
Computed Property
computed: {
photoUrl: function() {
return firebase.auth().currentUser.photoURL;
},
}
Function
onFileChanged: async function(e) {
this.image = e.target.files[0];
if (this.image) {
try {
this.loading = true;
const url = await saveImage(this.image, this.uploadProgress);
await auth.currentUser.updateProfile({
photoURL: url
});
await auth.currentUser.reload();
} catch (error) {
this.setTexto("An error occurred while updating your profile photo.");
this.setColor("error");
this.setVisible(true);
console.error(error);
} finally {
this.progreso = 0;
this.loading = false;
}
}
}
I am utilizing Firebase Cloud Storage to upload files as a promise.