firebase / firebase/firebase-admin-node

[FR] Auth: Provide an API to create/update users without unneeded API requests

オープン
#1,885 コメント 3 件 リアクション 1 件 担当者 2 名 @prameshj が担当を希望しています GitHub で見る
api: auth help wanted type: feature request
主要言語
TypeScript
スター
1.7k
フォーク
419
平均マージ
3日 10時間
マージ済み PR(30日)
16

説明

The [`updateUser()`](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md#baseauthupdateuser) and [`createUser()`](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md#baseauthcreateuser) methods always perform two API requests under the hood: (1) the create/update request, and (2) a subsequent [`getUser()`](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md#baseauthgetuser) 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`, avoiding the un-needed round-trip request.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。