Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete all users from firebase auth console

Is there an easy way to delete all registered users from firebase console? For example, I created a hundred users from my development environment, and now I want to delete all of them.

like image 692
Maximus S Avatar asked Aug 06 '16 21:08

Maximus S


People also ask

Where are Firebase Auth users stored?

The user data for firebase authentication is stored in firebaseLocalStorageDb in IndexedDB .

What does Firebase auth () CurrentUser return?

What does Firebase auth () CurrentUser return? If a user isn't signed in, CurrentUser returns null. Note: CurrentUser might also return null because the auth object has not finished initializing.


1 Answers

As in updated answer, you can probably use firebase admin tools now, but if you don't want – here is a bit more solid javascript to remove users in the web:

var intervalId;  var clearFunction = function() {   var size = $('[aria-label="Delete account"]').size()   if (size == 0) {     console.log("interval cleared")     clearInterval(intervalId)     return   }   var index = Math.floor(Math.random() * size)   $('[aria-label="Delete account"]')[index].click();   setTimeout(function () {      $(".md-raised:contains(Delete)").click()   }, 1000); };  intervalId = setInterval(clearFunction, 300) 

Just run it in developer tools

like image 130
AAverin Avatar answered Sep 20 '22 20:09

AAverin