将 FirebaseUI 与 AngularFire2 结合使用 [英] Use FirebaseUI with AngularFire2

查看:26
本文介绍了将 FirebaseUI 与 AngularFire2 结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有找到任何样本.是否可以在 AngularFire2 中使用 FirebaseUI?AFAIK UI 不是 AngularFire2 的一部分.

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

推荐答案

FirebaseUI(用于 Web)和 AngularFire2 之间确实没有直接集成.

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

AngularFire2 内置了与 Firebase 身份验证 JavaScript SDK 的较低级别登录功能集成的登录原语.有关这些的更多信息,请参阅 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.

但鉴于 AngularFire2 和 FirebaseUI-Web 都是建立在 Firebase Authentication JavaScript SDK 之上的,它们也很可能可以很好地协同工作.如果您从 FirebaseUI 启动登录流程,它最终会 触发 onAuthStateChanged() 事件 在 SDK 级别.那就是 Angularame2 监听器> 触发它自己的 onAuth() 事件.

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.

这篇关于将 FirebaseUI 与 AngularFire2 结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆