I have few authenticate users in the user list. And I want to remove one of them. Firebase documentation suggest me to use this code for remove any user.
admin.auth().deleteUser(id)
.then(function() {
console.log('Successfully deleted user');
})
.catch(function(error) {
console.log('Error deleting user:', error);
});
So I use it in my project like this way. I use firebase.auth instead of admin.auth. so my code is like this.
firebase.auth().deleteUser(id)
.then(function() {
console.log('Successfully deleted user');
})
.catch(function(error) {
console.log('Error deleting user:', error);
});
But it not working. Shows an error like this
deleteUser is not a function