Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
patricsteiner opened this issue Oct 25, 2024 · 1 comment

Comments

@patricsteiner
Copy link

patricsteiner commented Oct 25, 2024

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

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants