2
我目前正在按照本教程的說明使用Firebase驗證我的EmberApp:Ember authentication with Firebase。我正在使用Torii插件進行身份驗證。無法通過emberfire進行身份驗證
這是我迄今所做的:
應用程序/牌坊的適配器/ application.js中
import Ember from 'ember';
import ToriiFirebaseAdapter from 'emberfire/torii-adapters/firebase';
export default ToriiFirebaseAdapter.extend({
firebase: Ember.inject.service()
});
應用程序/適配器/ application.js中
import config from '../../config/environment';
import FirebaseAdapter from 'emberfire/adapters/firebase';
import Firebase from 'firebase';
export default FirebaseAdapter.extend({
firebase: new Firebase(config.firebase)
});
config/environment.js
module.exports = function(environment) {
var ENV = {
modulePrefix: 'my-auth-test',
environment: environment,
baseURL: '/',
locationType: 'auto',
firebase: 'MY_FIREBASE_URL',
torii: {
sessionServiceName: 'session'
},
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
};
...
路線/ application.js中 - >登錄功能
login: function() {
var controller = this.get('controller');
var email = controller.get('userEmail');
var password = controller.get('userPassword');
this.get('session').open('firebase', {
provider: 'password',
email: email,
password: password
}).then(function() {
this.transitionTo('protected');
}.bind(this));
}
的問題,我有如下錯誤: 請設置您的環境中配置的firebase
財產。
但據我所見,我有屬性集。有人可以幫我解決這個問題嗎?
請添加一些解釋你的答案。它爲什麼解決這個問題?海報做錯了什麼? – miken32