【发布时间】:2016-11-11 20:18:44
【问题描述】:
我目前正在将现有项目从以前的 Firebase.com 设置迁移到 Firebase 3/AngularFire 2。这是我第一次与每个人一起工作。
我的问题是:我正在使用 AngularFire 文档中的 $createUserWithEmailAndPassword 示例,并且希望在返回承诺后添加一个 updateProfile,但在最初的 $createUserWithEmailAndPassword 行之后我什么也没有发生。 “Auth”是我的工厂返回$firebaseAuth()。
Auth.$signInWithEmailAndPassword($scope.user.email, $scope.user.password)
.then(function(firebaseUser) {
console.log("Signed in as:", firebaseUser.uid);
}).catch(function(error) {
console.error("Authentication failed:", error);
});
我正在通过 Firebase/Google 控制台确认正在添加 Auth 用户,但我的控制台中没有收到任何错误 - 只是没有返回任何承诺。有什么想法/建议吗?
【问题讨论】:
-
你能不能也展示一下你的
Auth工厂? -
可能有两个原因 1 Auth.$signInWithEmailAndPassword 没有返回承诺 2 Auth.$signInWithEmailAndPassword 没有解决其正文中的承诺..
标签: angularjs ionic-framework firebase angularfire firebase-authentication