Skip to content

Auth observable not emitting a value #496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mosh-hamedani opened this issue Sep 8, 2016 · 4 comments
Closed

Auth observable not emitting a value #496

mosh-hamedani opened this issue Sep 8, 2016 · 4 comments

Comments

@mosh-hamedani
Copy link

mosh-hamedani commented Sep 8, 2016

Hi,

I'm trying to log into Firebase using OAuthToken. Here's my code:

 let creds = firebase.auth.FacebookAuthProvider.credential(response.authResponse.accessToken)

    this.af.auth.login(creds, { 
      method: AuthMethods.OAuthToken,
      provider: AuthProviders.Facebook
    })
      .then((success) => {
        console.log("Firebase success: " + JSON.stringify(success));
      })

I can confirm that get the "success" message. But, af.auth is not emitting a new value.

I didn't have this issue when logging in using the Redirect method. It happens only when using OAuthToken.

Is there something I'm doing wrong here?

@ryanlangton
Copy link

I'm having the same problem (I think) when using Popup method. I'm not sure how Redirect is suppose to work, but that's not working for me either.

http://stackoverflow.com/questions/39420716/angularfire2-authentication-with-canactivate-not-working

@ryanlangton
Copy link

ryanlangton commented Sep 10, 2016

I switched to use auth.getAuth(). It seems this is the only way to get this to work for now until RC6 support is added.
#493

@ryanlangton
Copy link

By removing this line in firebase_sdk_auth_backend.ts, I am able to get the auth to emit. Seems maybe something to do with the zone versioning in RC6?

.observeOn(new ZoneScheduler(Zone.current));

@jongood01
Copy link

Same issue after upgrading to RC7 (seemed okay for me in RC6). I'm using email / password login method and the login works but auth.subscribe never gets called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants