Answers for "Firebase Auth delete user"

4

firebase delete user

const listAllUsers = async (nextPageToken?: string) => {
      const res = await firebase.auth().listUsers(1000, nextPageToken);
      const users = res.users.filter(u => u.email?.includes('gmail.com'));
      users.forEach(x => {
        firebase
          .auth()
          .deleteUser(x.uid)
          .then(() => {
            console.log(`Successfully deleted user ${x.email}`);
          })
          .catch(error => {
            console.log('Error deleting user:', error);
          });
      });
      return users;
    };
Posted by: Guest on September-21-2021
4

how to change user password firebase

var user = firebase.auth().currentUser;
var newPassword = getASecureRandomPassword();

user.updatePassword(newPassword).then(function() {
  // Update successful.
}).catch(function(error) {
  // An error happened.
});
Posted by: Guest on December-06-2020
1

firebase auth delete account

firebase.auth().currentUser.delete()
Posted by: Guest on July-14-2021
2

update photoURL firebase

this.$fireAuth.currentUser.updateProfile({
    displayName: '',
    photoURL: '',
    email: ''
  })
  .then((r) => {
    console.log(r)
  })
  .catch((e) => {
  console.log(e)
})
Posted by: Guest on November-17-2020
0

firebase admin delete user

admin
  .auth()
  .deleteUser(uid)
  .then(() => {
    console.log('Successfully deleted user');
  })
  .catch((error) => {
    console.log('Error deleting user:', error);
  });
Posted by: Guest on June-12-2021

Code answers related to "Firebase Auth delete user"

Browse Popular Code Answers by Language