[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
instances.native
.auth()
.signInAnonymously()
.then(user => {
console.log('defaultApp user ->', user.toJSON());
.signInAnonymouslyAndRetrieveData()
.then(credential => {
if (credential) {
console.log('anotherApp credential ->', credential.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());
.signInAnonymouslyAndRetrieveData()
.then(credential => {
if (credential) {
console.log('anotherApp credential ->', credential.user.toJSON());
}
});
});