0
votes

I'm importing users from my company's G Suite account to a Firebase application. The import follows the 'import users without passwords' process to import the users with Google as the OAuth Provider.

Some of our accounts in G Suite are suspended, and I'd like that to carry over when the user is imported to Firebase - so the Auth account is disabled. So far, the only method to disable a Firebase Auth account I've found is manually through the Firebase Console.

Is there a method for setting a user as disabled when importing using admin.auth().importUsers?

1

1 Answers

1
votes

Passing disabled: true into the imported users should work, but the documentation is quiet about it.

If that doesn't work, the closest is to disable the users through the Admin SDK immediately after importing them:

admin.auth().updateUser(uid, {
  disabled: true
})