I have just started using Native script & Angular for developing apps. I opted for google firebase as by database source. I have managed to migrate my SQL data to firebase real-time database. I can retrieve the data from the json table fine. Now my question in terms of Login and Registration, can I query the username and passwords for logging in or do I have to use Firebase Authentication option with the email and password
Asked
Active
Viewed 298 times
0
-
Yes you can: https://stackoverflow.com/questions/37467492/how-to-provide-user-login-with-a-username-and-not-an-email – Emeric Dec 10 '18 at 14:27
-
Thank you got it – codex Dec 10 '18 at 17:36
1 Answers
0
I am looping values from my firebase database using objectKey technique.
uid:fcnb8wD7ZdgqfBYrUVUfW5Z1Azm2
{
"zcash_": 1.32569,
"machine": true,
"litecoin": 5.3655,
"decred": 6.25663,
"btc": 0.2364144
}
I m retrieving the BTC value. It returns the value but appends undefined twice before it shows the value I need. how can I eliminate the undefined values
firebase.getValue(`/machinelist/${userID}`)
.then(
result => Object.keys(result).forEach(key => {
var balance= result[key]['btc'];
console.log(balance);
}
)
.catch(error => console.log("Error: " + error));
This is how i am iterating my json object
codex
- 1
- 5