I have a method that executes some callbacks after the promises are resolved:
setProfilePicture(url: string) {
  this.auth.currentUser
    .then((user) => {
      user.updateProfile({ photoURL: url })
        .then(() => {
          this.auth.currentUser
            .then(user => { this.setUser(user); })
        })
        .catch(function (error) { console.log(error) });
    });
}
This method is in a service and is being called from a component. I'm trying to wait for the entire setProfilePicture method to finish before executing the next lines of code in my component. What would be the simplest way to achieve this?
