0
我正在编写一个EmberJS Web应用程序。我想使用Firebase创建和验证用户。我现在用的是余烬使用emberfire创建一个新用户
https://github.com/firebase/emberfire
我不能创建使用余烬用户。没有关于用户创建的信息。
有什么想法?
感谢
我正在编写一个EmberJS Web应用程序。我想使用Firebase创建和验证用户。我现在用的是余烬使用emberfire创建一个新用户
https://github.com/firebase/emberfire
我不能创建使用余烬用户。没有关于用户创建的信息。
有什么想法?
感谢
这是我的注册组件例如:
actions: {
signUp: function() {
let model = this.get('model');
let ref = this.get('firebaseApp').auth();
ref.createUserWithEmailAndPassword(model.get('email'), model.get('password'))
.then(function (userData) {
this.get('session')
.open('firebase', {
provider: 'password',
'email': model.get('email'),
'password': model.get('password')
})
.then(function() {
model.set('id', userData.uid);
model.save()
.then(function() {
this.get('router').transitionTo('login');
}.bind(this))
;
}.bind(this))
.catch(function (error) {
this.set('errorMessage', error.message);
}.bind(this));
}.bind(this))
.catch(function (error) {
this.set('errorMessage', error.message);
}.bind(this))
;
}
}