firebase / firebase/firebase-admin-node
[FR] - bulk update/edit auth users
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
**Is your feature request related to a problem? Please describe.**
It is not currently possible to bulk update a large amount of users customClaims in a single request, using a js map makes lots of requests and reaches rate limits very quickly. e.g
`users.map(user => firebaseAdmin.auth().setCustomUserClaims(user.uid, user.claims));`
Removing users then re-importing with bulkImport would logout all current users from web/mobile apps, it would also require users to set new passwords again so this isn't an option.
**Describe the solution you'd like**
add bulkUpdate or bulkEdit command that matches users by uid or email and updates matching records
**Describe alternatives you've considered**
putting updates onto a queue and processing them individually within the firebase customClaims rate limits
**Additional context**
even the ability to run small bulk updates such as 10 or 100 would be better than processing individually
example use case:
B2B with several "clients" all in one firebase account. A client gets an upgrade and all the users gain a new feature, a new attribute needs adding to each users custom claims
Contributor guide
Research direction
Start by reviewing the existing firebaseAdmin.auth().setCustomUserClaims and bulkImport usage described in the issue. Determine the supported matching and update semantics for a bulk operation, including practical batch sizes and rate-limit behavior. Done means a documented bulk update/edit capability can update matching users without deleting accounts or resetting passwords, with tests covering the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, node.js, typescript
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100