Can't re-login with Facebook
See original GitHub issueEnvironment
- Nativescript: 5.0.1
- Nativescript-Vue: 2.0.2
- TNS Core Modules: 5.0.5
- Android Runtime: 4.2.0
- nativescript-plugin-firebase: 7.4.3
- Device: Android Emulator (Nexus 5X API 27)
Describe the bug When I open the app and login with Facebook, it works fine. But if I logout and try to re-login (without closing the app), it doesn’t work. It seems the method firebase.login() never resolves. I don’t get any error messages. I only get it to work again if I close and re-open the app.
To Reproduce
- Login with firebase.login:
firebase.login({
type: firebase.LoginType.FACEBOOK,
facebookOptions: { scope: ['public_profile', 'email'] }
}).then(user => {
})
.catch(error => {
})
-
Logout via
firebase.logout()
-
Try to login again like in step (1), without closing the app
Additional context
Digging into the firebase.android.js file, I see that when I login for the first time, the method logInWithReadPermissions
is called and after some time the callback onSuccess
is also called, indicating successful login, as expected. But when I logout and click in login again, it seems that logInWithReadPermissions
is called, but I never get a callback.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@hcgustavo Thanks for the details (and others as well, for chiming in). I must admit that code looks a bit suspicious. I’ll take a look!
I have the exact same issue 😦 Waiting for the reply from Eddy.