[tests] update tests firebase bootstrap to use `signInAnonymouslyAndRetrieveData`

This commit is contained in:
Salakar 2018-02-11 16:52:14 +00:00
parent 8e00b7e607
commit 4c11dbfcce
1 changed files with 10 additions and 6 deletions

View File

@ -54,18 +54,22 @@ console.log('RNApps -->', RNfirebase.apps);
// no need for ready checks // no need for ready checks
instances.native instances.native
.auth() .auth()
.signInAnonymously() .signInAnonymouslyAndRetrieveData()
.then(user => { .then(credential => {
console.log('defaultApp user ->', user.toJSON()); if (credential) {
console.log('anotherApp credential ->', credential.user.toJSON());
}
}); });
// dynamically initialized apps need a ready check // dynamically initialized apps need a ready check
instances.another.onReady().then(app => { instances.another.onReady().then(app => {
app app
.auth() .auth()
.signInAnonymously() .signInAnonymouslyAndRetrieveData()
.then(user => { .then(credential => {
console.log('anotherApp user ->', user.toJSON()); if (credential) {
console.log('anotherApp credential ->', credential.user.toJSON());
}
}); });
}); });