You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are exploring the use of keycloak-angular in Angular v20 applications with a Micro-Frontend architecture using @angular-architects/native-federation.
Problem observed:
Angular often reports errors such as:
NG0201: No provider found for Keycloak or issues similar to those described in #432
and #465.
These issues appear only in MFE contexts before skipping Keycloak libraries. Monolithic applications work as expected. From what we have observed, a common recommendation is to enable a single auth library or shared service, skip the Keycloak libraries from the federation configuration, and share authentication information through that channel.
Context / observations:
Keycloak was primarily designed for monolithic Angular applications.
Multiple GitHub issues (e.g., #432) indicate challenges when sharing keycloak-js or keycloak-angular across hosts and remotes.
Deprecations in v20 removed some services that previously allowed custom DI or singleton patterns. This limits the ways Keycloak can be initialized before bootstrapping the host and remote applications.
Questions:
Is using keycloak-angular officially supported in Micro-Frontend architectures with Native Federation?
If yes, what is the recommended pattern to ensure that a Keycloak instance is properly available in Angular’s injector for host and remotes?
Is sharing keycloak-js or keycloak-angular as a singleton recommended or unsupported in these setups?
Is there an official DI token (e.g., KEYCLOAK_INSTANCE) for this purpose in v20?
Any official guidance or recommended patterns would be greatly appreciated.
Description:
Hello keycloak-angular team,
We are exploring the use of keycloak-angular in Angular v20 applications with a Micro-Frontend architecture using @angular-architects/native-federation.
Problem observed:
Angular often reports errors such as:
NG0201: No provider found for
Keycloakor issues similar to those described in #432and #465.
These issues appear only in MFE contexts before skipping Keycloak libraries. Monolithic applications work as expected. From what we have observed, a common recommendation is to enable a single auth library or shared service, skip the Keycloak libraries from the federation configuration, and share authentication information through that channel.
Context / observations:
Keycloak was primarily designed for monolithic Angular applications.
Multiple GitHub issues (e.g., #432) indicate challenges when sharing keycloak-js or keycloak-angular across hosts and remotes.
Deprecations in v20 removed some services that previously allowed custom DI or singleton patterns. This limits the ways Keycloak can be initialized before bootstrapping the host and remote applications.
Questions:
Any official guidance or recommended patterns would be greatly appreciated.
References:
Thank you very much for your time!