[auth][ios] finalised auth changed listener logic

This commit is contained in:
Salakar
2017-07-17 20:56:08 +01:00
parent 2d744b162e
commit d8fee7f5cb
6 changed files with 110 additions and 67 deletions

View File

@@ -43,15 +43,19 @@ const instances = {
console.log('RNApps -->', RNfirebase.apps);
// natively initialized apps are already available at app run time,
// no need for ready checks
instances.native.auth().signInAnonymously().then((user) => {
console.log('defaultApp user ->', user.toJSON());
});
instances.another.auth().signInAnonymously().then((user) => {
console.log('anotherApp user ->', user.toJSON());
// dynamically initialized apps need a ready check
instances.another.onReady().then((app) => {
app.auth().signInAnonymously().then((user) => {
console.log('anotherApp user ->', user.toJSON());
});
});
instances.web.database().ref('tests/types').set(DatabaseContents.DEFAULT);
instances.web.database().ref('tests/priority').setWithPriority({