mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-23 20:10:05 +08:00
[auth][ios] finalised auth changed listener logic
This commit is contained in:
@@ -43,15 +43,19 @@ const instances = {
|
||||
|
||||
console.log('RNApps -->', RNfirebase.apps);
|
||||
|
||||
// natively initialized apps are already available at app run time,
|
||||
// no need for ready checks
|
||||
instances.native.auth().signInAnonymously().then((user) => {
|
||||
console.log('defaultApp user ->', user.toJSON());
|
||||
});
|
||||
|
||||
instances.another.auth().signInAnonymously().then((user) => {
|
||||
console.log('anotherApp user ->', 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());
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
instances.web.database().ref('tests/types').set(DatabaseContents.DEFAULT);
|
||||
|
||||
instances.web.database().ref('tests/priority').setWithPriority({
|
||||
|
||||
Reference in New Issue
Block a user