[tests] update tests firebase bootstrap to use `signInAnonymouslyAndRetrieveData`
This commit is contained in:
parent
8e00b7e607
commit
4c11dbfcce
|
@ -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());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue