Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FR]: add function to set single claim instead of all claims `setCustomUserClaim('myClaim', value)`

Open
#2,742 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript

Research direction

Start by reading the existing setCustomUserClaims API and the custom-claims handling in the authentication SDK. Define the concurrency and replacement semantics for a setCustomUserClaim method, then add coverage for updating one claim without overwriting other claims; done means the API and its behavior are documented and tested.

Written by the indexing model from the issue text.

Description

api: auth type: feature request

Is your feature request related to a problem? Please describe.
When updating auth custom claims, i need to make sure i always include all existing claims, because setCustomUserClaims always overrides all claims. --> When multiple requests run simultaneously, we run into transactional issues (2 requests read claims, first requests updates claims with a new field, second request updates claims with another field but overrides changes from first request).

Describe the solution you'd like
setCustomUserClaim('myClaim', value) in addition to setCustomUserClaims(allClaims)

Describe alternatives you've considered
Writing claims to my own db, then regularly sync it to firebase -> this is too complicated though for something that could be solved much simpler with a new method setCustomUserClaim.

Additional context
none

Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
4d 20h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-node

All issues in firebase/firebase-admin-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.