nativescript-plugin-firebase icon indicating copy to clipboard operation
nativescript-plugin-firebase copied to clipboard

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

Open cbanzet opened this issue 3 years ago • 1 comments

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.

cbanzet avatar Mar 31 '21 14:03 cbanzet

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

mika-ella avatar Jan 28 '22 06:01 mika-ella