Use FirebaseUI with AngularFire2

前端 未结 2 1363
耶瑟儿~
耶瑟儿~ 2021-02-14 07:18

I haven\'t found any samples. Is it possible to use the FirebaseUI with AngularFire2? AFAIK the UI is not part of AngularFire2.

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-14 08:00

    There is indeed no direct integration between FirebaseUI (for the web) and AngularFire2.

    AngularFire2 has built in sign-in primitives that integrate with the lower-level sign-in functionality of the Firebase Authentication JavaScript SDK. For more about those, see the AngularFire2 documentation on user authentication.

    But given that both AngularFire2 and FirebaseUI-Web are built on top of the Firebase Authentication JavaScript SDK, they'll likely work together fine too. If you start a sign-in flow from FirebaseUI, it will in the end trigger an onAuthStateChanged() event on the SDK level. That is the same event that AngularFire2 listens to to fire its own onAuth() event.

提交回复
热议问题