AngularFireAuthGuard interferes with bindings
Version info
Angular: 9.0.2
Firebase: 7.15.0 AngularFire: 6.0.0-rc1
Other (e.g. Ionic/Cordova, Node, browser, operating system): Chrome 80
How to reproduce these conditions
Steps to set up and reproduce
- Add AngularFireAuthGuard to a route
- Create reactive form
- Add some output areas to see values update
I've attached a sample project. Just updated the environment files with your own Firebase config. Look at the /login route.
With the guard in place, on /login you will see that typing in anything in those form fields results in no binding updates, nothing happens. Remove the auth guard from the route for /login and the bindings start working again. I added my own trivial auth guard and bindings still work so there looks to be an issue with the angular fire auth guard.
Debug output
** Errors in the JavaScript console **
There are no errors in the console.
Expected behavior
- Bindings should update
Actual behavior
- Nothing happens
@leandroz You are right, I noticed a difference in behavior when using child routes. At least for me, I could fix it by forcing everything into the Angular zone. The gist has been updated accordingly
Maybe the guards should be allowed to run outside of zone and then it's an @angular/router issue https://github.com/angular/angular/issues/37223 😉
This will clearly happen again with other apps and libs.
Any resolution on this issue?
Also started experiencing this issue and its a blocker for us to move to production
Also started experiencing this issue and its a blocker for us to move to production
it block my project too.
Guys if it’s blocking write your own guards.
On Sat, 20 Jun 2020 at 23:00 Longcharmroeun [email protected] wrote:
Also started experiencing this issue and its a blocker for us to move to production
it block my project too.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/angularfire/issues/2355#issuecomment-647067812, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDJDUW7TFLUAGM4I27PTF3RXVST5ANCNFSM4LMWFUTQ .
-- Leandro Zubrezki Freelance Software Developer
is this issue resolved?
yes, it's been resolve in recent patches