Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Created May 7, 2020 00:04
Show Gist options
  • Save hiranya911/1e59718e4a979975b1fadd346b636531 to your computer and use it in GitHub Desktop.
Save hiranya911/1e59718e4a979975b1fadd346b636531 to your computer and use it in GitHub Desktop.
const admin = require('firebase-admin');
// Usage: node delete_user.js <email>
const app = admin.initializeApp();
const email = process.argv[2];
admin.auth().getUserByEmail(email)
.then((user) => {
return admin.auth().deleteUser(user.uid);
})
.then(() => {
return app.delete();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment