[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
|
||||
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());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue