I keep receiving the error that the session var is not defined. I've looked at other answers on here about restarting ember serve to remove any caching issues but I've tried that multiple times and I've followed the emberfire guide to the letter. Does anyone have any idea what could be going wrong? The authentication succeeds but the session doesn't get bound to. Here are my files:
/app/routes/application.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.query('post', {
orderBy: 'timestamp',
limitToLast: 3
});
},
actions: {
authenticate: function(username, pass) {
this.get('session').open('firebase', {
provider: "password",
email: username,
password: pass
}).then(function (data) {
console.log(data.currentUser);
console.log(session);
});
}
}
});
/app/torii-adapters
import Ember from 'ember';
import ToriiFirebaseAdapter from 'emberfire/torii-adapters/firebase';
export default ToriiFirebaseAdapter.extend({
firebase: Ember.inject.service()
});
/config/environment.js
var ENV = {
modulePrefix: 'website',
environment: environment,
contentSecurityPolicy: { 'connect-src': "'self' http://ift.tt/1BUFYb6 http://ift.tt/1Us4oBa" },
firebase: 'http://ift.tt/1JMLCTr',
torii: {
sessionServiceName: 'session'
},
baseURL: '/',
locationType: 'auto',
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
}
};
Aucun commentaire:
Enregistrer un commentaire