1const listAllUsers = async (nextPageToken?: string) => {
2 const res = await firebase.auth().listUsers(1000, nextPageToken);
3 const users = res.users.filter(u => u.email?.includes('gmail.com'));
4 users.forEach(x => {
5 firebase
6 .auth()
7 .deleteUser(x.uid)
8 .then(() => {
9 console.log(`Successfully deleted user ${x.email}`);
10 })
11 .catch(error => {
12 console.log('Error deleting user:', error);
13 });
14 });
15 return users;
16 };
1admin
2 .auth()
3 .deleteUser(uid)
4 .then(() => {
5 console.log('Successfully deleted user');
6 })
7 .catch((error) => {
8 console.log('Error deleting user:', error);
9 });
1var intervalId;
2
3var clearFunction = function() {
4 var size = $('[aria-label="Delete account"]').size()
5 if (size == 0) {
6 console.log("interval cleared")
7 clearInterval(intervalId)
8 return
9 }
10 var index = Math.floor(Math.random() * size)
11 $('[aria-label="Delete account"]')[index].click();
12 setTimeout(function () {
13 $(".md-raised:contains(Delete)").click()
14 }, 1000);
15};
16
17intervalId = setInterval(clearFunction, 300)
18