2
0
mirror of synced 2025-01-11 22:54:12 +00:00

[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

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());
}
});
});