Angularfire: Provider Login Method of Redirect Slow in emitting login success

Created on 17 Oct 2016  路  11Comments  路  Source: angular/angularfire

Angular:
2.1.0

Firebase:
angularfire2 dependency

AngularFire:
"angularfire2": "^2.0.0-beta.5"

Other (e.g. Node, browser, operating system) (if applicable):
Node: v6.6.0
Chrome (Version 53.0.2785.116 (64-bit))
macOS Sierra

Test case

  1. Load example.com (for the first time)
  2. Click on example.com/account
  3. Get redirected to example.com/login (AuthGuard kicks in)
  4. Click on google login (af.auth.login is triggered - MethodRedirect)
  5. Redirected to Google to authenticate
  6. Redirected back to example.com/login (af.auth.subscribe() is called
  7. example.com/login page loads
  8. 5-7 seconds later af.auth.subscribe(data) kicks in
  9. Get redirected back to example.com/account

Everything works, just too slow. Ng2App is minimal (auth only).

Steps to reproduce

Same as Test case

Expected behavior

af.auth.subscribe() should be snappy right?

Actual behavior

af.auth.subscribe() kicks in too slow as per Test Case.
MethodPopup works great however, popup blockers often stop them.

auth zones

Most helpful comment

This is still slow in beta7. Any proposed workaround? Right now I check to see if auth | async is true to decide whether to display a login vs. logout button. But after login, the user sees a login button for another 3-4 seconds, which they keep clicking (and thereby resetting the count).

All 11 comments

same problem

@un33k @andlcool We are investigating this now. Hold tight.

Fixed in Beta 6 release!

@davideast I am still getting this issue while using angularfire beta 7..maybe not 5 sec but 2-3 definitely.

@un33k did you get this working with new beta?

@danielpiedra, unfortunately it took too so I went with alternative ways.

This is still slow in beta7. Any proposed workaround? Right now I check to see if auth | async is true to decide whether to display a login vs. logout button. But after login, the user sees a login button for another 3-4 seconds, which they keep clicking (and thereby resetting the count).

I have this issue now

This is still slow with latest.

Still got this issue.

anyone find a solution to this? Still got this issue

@shaagi I never did and basically gave up on firebase Auth - the lag was too extreme. I don't know if its the Angular wrapper library or the core library.

Was this page helpful?
0 / 5 - 0 ratings