You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The updateUser() and createUser() methods always perform two API requests under the hood: (1) the create/update request, and (2) a subsequent getUser() request.
In latency-sensitive applications where the result of getUser() is not required, this means an extra un-needed sequential round-trip network request. This fact is not apparent from the API or documentation.
Proposal
Add a second, optional parameter to createUser() and updateUser() called something like noFetchUserRecord which defaults to false (existing behaviour). If true, the getUser() request will be skipped, and the function will return Promise<void>, avoiding the un-needed round-trip request.
The text was updated successfully, but these errors were encountered:
@lahirumaramba@prameshj I noticed you added the "help wanted" label. I'm more than happy to submit a PR for this, however we need to align on the proposal first. What are your thoughts?
@lahirumaramba@prameshj didn't get a response so assuming that you were ok with my original proposal? I have drafted the PR accordingly, along with tests etc, it would be great if you can take a moment to check it 🙏🏼 .
basus942
pushed a commit
to basus942/firebase-admin-node
that referenced
this issue
Feb 3, 2025
The
updateUser()
andcreateUser()
methods always perform two API requests under the hood: (1) the create/update request, and (2) a subsequentgetUser()
request.In latency-sensitive applications where the result of
getUser()
is not required, this means an extra un-needed sequential round-trip network request. This fact is not apparent from the API or documentation.Proposal
Add a second, optional parameter to
createUser()
andupdateUser()
called something likenoFetchUserRecord
which defaults tofalse
(existing behaviour). Iftrue
, thegetUser()
request will be skipped, and the function will returnPromise<void>
, avoiding the un-needed round-trip request.The text was updated successfully, but these errors were encountered: