Repository navigation
fix: run Keycloak token refresh outside Angular zone to avoid unnecessary change detection - #2166
Merged
lbroudoux merged 2 commits intoJun 25, 2026
Conversation
…sary change detection Wrapping the periodic token refresh setInterval in NgZone.runOutsideAngular() prevents Angular from triggering change detection every 30 seconds when no UI-relevant state has changed. Fixes microcks#2124 Signed-off-by: Harishrs2006 <[email protected]>
Harishrs2006
requested review from
SebastienDegodez,
lbroudoux and
yada
as code owners
June 11, 2026 17:23
AuthenticationServiceFactory was manually instantiating the service without the NgZone argument, causing a build failure. Updated the factory function and deps array to include NgZone. Signed-off-by: Harishrs2006 <[email protected]>
lbroudoux
approved these changes
Jun 25, 2026
lbroudoux
left a comment
Member
There was a problem hiding this comment.
It looks all good. Thanks for pushing this.
lbroudoux
pushed a commit
that referenced
this pull request
Aug 5, 2026
…sary change detection (#2166) * fix: run Keycloak token refresh outside Angular zone to avoid unnecessary change detection Wrapping the periodic token refresh setInterval in NgZone.runOutsideAngular() prevents Angular from triggering change detection every 30 seconds when no UI-relevant state has changed. Fixes #2124 Signed-off-by: Harishrs2006 <[email protected]> * fix: pass NgZone to KeycloakAuthenticationService in factory provider AuthenticationServiceFactory was manually instantiating the service without the NgZone argument, causing a build failure. Updated the factory function and deps array to include NgZone. Signed-off-by: Harishrs2006 <[email protected]> --------- Signed-off-by: Harishrs2006 <[email protected]> (cherry picked from commit fcce6ac)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setIntervaltoken refresh inNgZone.runOutsideAngular()NgZoneas a constructor dependency inKeycloakAuthenticationServiceChanges
webapp/src/main/webapp/src/app/services/auth-keycloak.service.tsTest plan
Fixes #2124