facebookLogin(token: string): Rx.Observable<UserModel> {
const credential = Fb.auth.FacebookAuthProvider.credential(token);
const signInPromise = Fb.auth().signInWithCredential(credential) as Promise<Fb.User>;
return Rx.Observable
.fromPromise(signInPromise)
.map((user, idx) => new UserModel(user));
}
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/3d61e6dd-9e2d-4270-85bd-78e3b2d712dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey Alex,Is the listener triggering with null? Or is not triggering at all? We've tested the 3.3.0 SDK on our React Native test app via the simulator and the user state was maintained.We unfortunately don't have enough information to reproduce this issue. Is there any way you could give us some more info?Cheers,Jacob
On Fri, Aug 26, 2016 at 1:29 PM, Alex Rudyk <alex....@gmail.com> wrote:
I am using Firebase Web SDK 3.3.0 with React Native app and working on Facebook login feature. I added react native Facebook SDK (JS wrapper on top of native FB SDK) and got Facebook auth token from it. Then I login with firebase with this code snippet:facebookLogin(token: string): Rx.Observable<UserModel> {
const credential = Fb.auth.FacebookAuthProvider.credential(token);
const signInPromise = Fb.auth().signInWithCredential(credential) as Promise<Fb.User>;return Rx.Observable
.fromPromise(signInPromise)
.map((user, idx) => new UserModel(user));
}Everything works fine and I am able to get Firebase User back and check that currentUser is not null.The problems is that after app restart currentUser is null and Firebase.auth().onAuthStateChanged() never gets a user.Is that a bug, or I am doing something wrong?alex
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.