Delete all users from firebase auth console

后端 未结 16 1686
臣服心动
臣服心动 2020-12-04 11:53

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 a

16条回答
  •  情话喂你
    2020-12-04 12:23

    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

提交回复
热议问题