nativescript-plugin-firebase
nativescript-plugin-firebase copied to clipboard
Can't re-log (autorelog) user to Nativescript Firebase App on iOS
I'm having problems re-logging the user previously logged in with Facebook or Google Sign In on my Nativescript iOS App. It works good with an email/password re-authentication on iOS.
It seems that the function
firebase.init({ persist:true, onAuthStateChanged: (data: any) => { console.log(JSON.stringify(data)) if (data.loggedIn) { AuthService.tokenUid = data.user.uid; // this.routerExtensions.navigate(["/splash"]) } else { AuthService.tokenUid = '' } }, iOSEmulatorFlush: true }).then( () => { console.log("firebase.init done"); }, error => { console.log(
firebase.init error: ${error}); } );
returns
{"loggedIn":false,"user":null}
when the user re-launch the app after closing it. There is no problem with Android.
did you find any solutions to this? and are you sure it is working on android? when I restart my app, the recent user that is logged in is the same :/