将FirebaseUI与AngularFire2一起使用 [英] Use FirebaseUI with AngularFire2

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

问题描述

我还没有找到任何样品.是否可以在AngularFire2中使用 FirebaseUI ? AFAIK用户界面不属于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身份验证JavaScript SDK构建的,因此它们也可能会很好地协作.如果您从FirebaseUI启动登录流程 ,它将最终触发onAuthStateChanged()事件在SDK级别上.那就是 AngularFire2监听相同事件触发自己的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天全站免登陆