Reputation: 9013
I'm using the built-in Firebase password authentication and I'm wondering what a "reasonable" timeout for logging in via authWithPassword()
. I had thought initially that this would be sub-second but now it appears there is a lot of volatility and even at 3 seconds I'm getting a lot of timeouts.
note: I suspect this might not be the highest priority because for typical client app the logging in process is a one-time affair but for micro-services the headroom of 3 seconds is pretty substantial (most operations overall run time is 1-2 seconds). Happy to be wrong.
Upvotes: 1
Views: 231
Reputation: 32604
This is fairly subjective to the app, but Firebase login should be faster than 3 seconds. If you're consistently seeing long times and connection errors, then you should contact [email protected].
You can also let Firebase handle the timeout and/or errors for you in the callback:
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.authWithPassword({
email : "[email protected]",
password : "correcthorsebatterystaple"
}, function(error, authData) {
if (error) {
// this is your login issue
console.error("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
Upvotes: 1