[SOLUTION] * I generated a firebase initializer and pasted this below,
export function initialize(application) {
var config = {
apiKey: "*replace with yours",
authDomain: "*replace with yours",
databaseURL: *"replace with yours,
storageBucket: "*replace with yours",
messagingSenderId: "*replace with yours"
};
firebase.initializeApp(config);
}
export default {
name: 'firebase',
initialize
};
Hi everyone.I was trying to implement natural firebase authentication(email/password).
When i hit login/logout/singup i get this error
Uncaught Error: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp().(…)
I know for a fact that my app is connected to my firebase project.I tested to see if it is creating records.I generated simple model and a route to display them.They work.But when i hit login logout or singuo i get the error
-----------------app/templates/index.hbs-------------------
E{{input value=email}}
P{{input value=password}}
<button {{action 'login'}}>Login</button>
<button {{action 'signup'}}>Signup</button>
<button {{action 'logout'}}>Logout</button>
------------app/routes/index.js------------
login(){
firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
});
},
signup(){
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
});
},
logout(){
firebase.auth().signOut().then(function() {
}, function(error) {
});
}
I enabled email/password auth option