EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Can't re-log (autorelog) user to Nativescript Firebase App on iOS #1800

Open cbanzet opened 3 years ago

cbanzet commented 3 years ago

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.

mika-ella commented 2 years ago

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 :/