firebase / firebase/firebase-admin-node

FR: Allow custom meta data for user objects

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

説明

I find it crazy annoying that Firebase User Objects can't have any custom metadata related with them.

Simple example if I would like to automatically send the verification email within a `onCreate` cloud function when the user signs up like described in [#46](46#issuecomment-425073754). There is no sane way for me to find out the users locale for the email as the `firestore` / `realtime database` user record might not be created yet.

The same is true if I would like to block users depending on some custom logic that might depend on a value specific to the user like described in [this issue](https://github.com/firebase/firebaseui-web/issues/99#issuecomment-359443621).

Even custom claims are not a solution as they might not be set yet when the `onCreate` method runs. Setting custom claims in the `onCreate` method is impossible as well as all I have access to is the `user` object and as I said it can contain any custom metadata.

For my understanding allowing custom meta information for users would solve a lot of problems that are currently present if somebody wants to use Firebase Authentication in a few more advanced ways than the barebones the firebase SDKs currently offer.

* Operating System version: Cloud Functions Node 8.14.0
* Firebase SDK version: 6.3.0
* Firebase Product: Auth & Functions

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

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

評価

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

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

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