Home > database >  How i can delete a user auth (email , password ) firebase angular
How i can delete a user auth (email , password ) firebase angular

Time:12-29

in This app , there's on user who can create accounts and delete !

  deleteAuthTech (){
  return this.fireauth.user.subscribe((y)=>y.delete())
    
  }

CodePudding user response:

Try reorganize your code like this

 deleteAuthUser() {
          this.fireauth.user.subscribe(user => {
            user.delete().then(() => {
              console.log('User was deleted');
            }).catch(error => {
              console.error(error);
            });
          });
        }
  • Related