Open Authentication
- In the sidebar, expand your account, then the project.
- Click Authentication, the first item under the project, above its collections or databases.
- An Authentication tab opens for that project and lists its users straight away.
Each project has its own Authentication tab. Users belong to the whole project, not to one database, so a project with several databases still has one Authentication item.
With the Firebase Emulator, the item appears only if you gave the Auth emulator address. In File, Connect to emulator, fill in Auth emulator address (optional, for users), usually 127.0.0.1:9099. When Firetool picks up an emulator from FIRESTORE_EMULATOR_HOST, it takes the Auth address from FIREBASE_AUTH_EMULATOR_HOST.
If you see "Firebase Authentication isn't set up in this project yet.", turn on Authentication for the project in the Firebase console first.
Find a user
- Type into the box marked Find by email, phone (+91…) or UID.
- Press Find or Enter.
Firetool decides what you typed: anything with an @ is looked up as an email address, anything starting with + as a phone number, and the rest as a UID. Phone numbers need the country code, for example +919876543210. If nothing matches you see No users found.
List all users
- Choose List all users. Firetool loads 500 users and shows them newest first.
- If the project has more, a Load more button appears at the bottom right. Each press adds the next 500.
The table shows uid, email, phone, name, sign-in (the providers, such as password or phone), created, last sign-in, status (Active or Disabled) and custom claims. The status bar counts the users shown. Finding and listing users works in the Free edition and costs no Firestore reads.
Filter by sign-in, claim or status
Firebase can only look users up by email, phone number or UID, so Firetool filters the users it has loaded. Once users are listed, the Show row above the table has:
- a sign-in provider, such as
password,google.com,phoneoranonymous; - a custom claim:
rolefor every user who has that claim, orrole=adminfor a value; - a status: active, disabled, email not verified, with two-step or never signed in.
While the project has more users than are loaded, Load all users pages through every one (it costs no Firestore reads; Stop loading stops it). Clear removes the filter. Select all and Export CSV take the users shown.
A user's page
Choose ↗ next to a user's UID (or Open user page in the user editor) for one page with the account, the Firestore documents that hold the UID, the user's Storage files and the changes Firetool made for them. See the user page.
Create a user
- Choose New user.
- Fill in what you need: UID (optional) (leave it empty for an automatic UID), Email, Phone (E.164, e.g. +919876543210), Display name and Password.
- Tick Email verified or Account disabled if they apply.
- Add Custom claims if the user needs them (see below).
- Choose Create user. The new UID is shown and the user is added to the top of the list.
Creating, editing, disabling, deleting, making links and exporting users need Pro. The Free edition can find and list them.
Edit a user
- Click the user's UID in the table. The Edit user window opens, with the UID, sign-in providers, created date and last sign-in at the top.
- Change Email, Phone, Display name, Email verified or Account disabled.
- To set a password, type it in New password (leave empty to keep).
- Choose Save changes. Only the fields you changed are sent; if nothing changed, the window just closes.
Custom claims
Custom claims are extra values on a user's ID token that your security rules and back end can check. In New user or Edit user, type them in Custom claims (JSON, used in security rules) as one JSON object:
{
"role": "support",
"region": "south"
}
The box must hold an object, not a list or a plain value; otherwise Firetool says so and saves nothing. To remove all claims, empty the box and save. The user gets new claims the next time their app refreshes its token.
Password reset and verification links
- Open the user with Edit user. The user needs an email address.
- Choose Password reset link, or Verification link (shown only while the email isn't verified).
- Choose Copy link and send it to the user yourself.
Firebase doesn't email these links when Firetool asks for them. Anyone with the link can use it, so share it only with that user. The audit log records that a link was made, but not the link itself.
Disable, enable or sign out everywhere
- Tick the users in the first column, or tick the header box to select every user shown.
- Choose Disable, Enable or Sign out everywhere.
A disabled user can't sign in until enabled again. Sign out everywhere revokes the user's refresh tokens, so they have to sign in again on every device. Each job is listed in Tools, Tasks.
Delete users
- Tick the users to delete.
- Choose Delete, then confirm.
Deleting can't be undone. The audit log keeps a copy of each account's details (for up to 1,000 accounts in one delete), but users can't be restored from it. If some accounts couldn't be deleted, Firetool says how many and why, and leaves them selected.
Export users to CSV
- Show the users you want: List all users and Load more until the button goes away for everyone, or Find for one.
- Choose Export CSV and pick where to save it.
The file is named <project>_auth-users_<date>.csv and has the columns uid, email, phoneNumber, displayName, providers, createdAt, lastSignInAt, disabled, emailVerified and customClaims. It opens in Excel. Only the users shown are exported, never passwords. The export is recorded in the audit log, and it's refused if the project's policy turns exports off.
Import users from a file
- Choose Import users… and pick a file: Firetool's Export CSV (
uid,email,phoneNumber,displayName,emailVerified,disabledandcustomClaimsas JSON), or, from 4.5.4, a file made by the Firebase CLI'sauth:export(JSON, or its CSV without column names). A user without auidgets a new one. - Firetool checks every row first. Rows with a bad email or phone number, broken or reserved custom claims, or the same uid, email or phone twice are listed and left out.
- To bring passwords along, give the hash settings they were made with: pick the Firebase project they came from (its key is read in the background and never shown), or type them in (SCRYPT, BCRYPT, HMAC, SHA, MD5, PBKDF2 or standard scrypt). Skip this and users are created without passwords.
- Check the count and the first few users, then choose Import.
Users without a password sign in with Google or another provider, an email link, or set a password from a reset link. Sign-in providers, text-message second factors and sign-up dates in a CLI file come along too. A user whose uid or email already exists is skipped and named in the result, never changed. In a production project, Firetool asks for the project ID first, and the import goes in the audit log, which names the hash algorithm but never the key. From the terminal: firetool users import --file <file>.
Copy users to another project
- Tick the users to copy, or tick none to copy every user.
- Choose Copy to project… and pick the project to copy to (any project you can open in Firetool).
- Choose Copy. The result says how many were copied and names any that were skipped.
Users keep their uid, email, phone number, sign-in methods, custom claims and second factors. Passwords come along too when Firetool can read the source project's password settings (your account needs the Firebase Authentication Admin role); otherwise those users can set a new password from a reset link. A user whose uid or email is already in the target is skipped, never changed. The copy follows the target project's rules and goes in its audit log.
Tenants
A project that uses Google Cloud Identity Platform can have tenants, each with its own users. When it does, a picker appears in the Authentication tab: choose a tenant to find, list, create, edit, import and delete its users. Every change in the audit log names the tenant. Copy to project… works from a tenant too, and its Into box picks the target project's own users or one of its tenants; passwords use the tenant's own hash settings.
Two-step sign-in
The two-step column shows each user's second sign-in factors, such as a phone number (as Firebase masks it) or an authenticator app, so you can see who has multi-factor sign-in turned on.
Remove a second factor
New in 4.5.4, for a user who lost their phone or authenticator app:
- Open the user with Edit user and choose Remove second factors…, or choose Remove… beside Two-step on the user's page.
- The user's text-message and authenticator-app factors are listed, all ticked. Untick the ones to keep.
- Choose Remove. The user then signs in without that factor until they set it up again.
An authenticator app can't be kept while another factor is removed, because Firebase never gives its secret back; the dialog says to tick them all, and the user sets up again the ones they still have. If the user's factors changed after you opened the dialog, nothing is removed. The audit log records which factors went. A removed factor can't be put back: Undo this operation lists it as something to set up again.
Authentication settings
New in 4.5.5: choose Settings… in the Authentication tab, or Authentication settings in the command palette, to see a project's sign-in settings:
- the sign-in providers and whether each is on;
- the authorised domains;
- the password policy and two-step sign-in;
- one account per email and email enumeration protection;
- the email templates (subject, sender and reply-to) and the mail server, never its password;
- the blocking functions.
Each group has Edit…: turn providers on or off, add and remove authorised domains, and change the password policy, two-step sign-in and account settings. Firetool shows each change, before and after, and sends only what changed. If someone changed the settings after you opened them, nothing is saved and Firetool says so. A new provider that needs a client secret is set up in the Firebase console.
Changes follow the project's rules (a production project asks for its project ID) and go in the audit log, whose entry offers Put back the earlier settings…. Client secrets, the password hash key and the API key never reach the window. Reading the settings is free; changing them needs Pro.
Rules and the audit log
- Viewer role: you can find, list and open users, but the change buttons are off.
- Read-only project: no user changes for anyone. A read-only mark on one database doesn't cover users; mark the whole project.
- Production project: deleting users asks you to type the project ID first, once per operation.
- Reasons and limits: if the project asks for a reason for every change, user changes ask too, and the limit on how many items one delete may remove counts users.
In Tools, Audit log, user changes appear as Created user, Changed user, Deleted user and Made a user link, with the names of the fields that changed. Passwords are never written to the log. See Roles and production safety for setting these rules.
Users in JS Query
JS Query scripts (Pro) get an auth object in the Admin SDK style. Its calls go through the same rules and audit log as the Authentication tab:
| Call | What it does |
|---|---|
auth.getUser(uid) | One user by UID |
auth.getUserByEmail(email) | One user by email |
auth.getUserByPhoneNumber(phone) | One user by phone number |
auth.listUsers(maxResults, pageToken) | A page of users (up to 1,000) and the next pageToken |
auth.createUser(props) | Creates a user |
auth.updateUser(uid, props) | Changes a user |
auth.setCustomUserClaims(uid, claims) | Sets custom claims |
auth.revokeRefreshTokens(uid) | Signs the user out everywhere |
auth.deleteUser(uid), auth.deleteUsers(uids) | Deletes one or many users |
auth.generatePasswordResetLink(email), auth.generateEmailVerificationLink(email) | Returns a one-time link |
// Users who signed up with an example.com address, from the first page
const { users } = await auth.listUsers(1000);
return users.filter((u) => u.email.endsWith("@example.com"));
More in JS Query.
Questions
Why is there no Authentication item under my emulator project?
The emulator was added without an Auth emulator address. Remove it, then add it again with File, Connect to emulator, and fill in Auth emulator address (optional, for users), for example 127.0.0.1:9099.
Can I bring users in from a file?
Yes: choose Import users… and pick Firetool's Export CSV or a Firebase CLI auth:export file (see Import users from a file above). Passwords come along when you give their hash settings, and users that already exist are skipped.
Related
- Firebase Authentication user manager: what the Authentication tab can do.
- The user page: a user's account, documents, files and changes in one place.
- Roles and production safety: Viewer and Editor roles, read-only and production projects.
- JS Query: scripts with
dbandauth. - Connect to Firestore: Google sign-in, service account keys and the emulators.