As soon as I click the button it will try and log me in and I haven't even made a call to : auth.login('password', { email: email, password:password,rememberMe: false}); yet...
I use the rememberme: false setting and it still does the same thing. Why does it try to log me in automatically without calling auth.login?
var baseRef = new Firebase("https://XXX.firebaseIO.com");
$("button").click(function(){
var auth = new FirebaseSimpleLogin(baseRef, function(error, user) {
if (error) {
// an error occurred while attempting login
console.log(error);
} else if (user) {
// user authenticated with Firebase
console.log('Logged in -- > User ID: ' + user.id + ', Provider: ' + user.provider);
} else {
console.log('Userlogged out ');
// user is logged out
}
});
}
The docs for email/password have this blurb:
So to clarify a bit, setting
rememberMe: false(which is the default behavior) would not prevent saving the login between page loads, but instead causes the token to be invalidated after the current browser session is closed. Inversely, setting this totruepreserves the token for 30 days.