Repository navigation
Angular Module Federation #14885
Unanswered
fraschizzato
asked this question in
Q&A
Replies: 1 comment
|
I got the same issue with: keycloak-angular ^14.0.0 |
0 replies
Sign up for free
8000
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
at this time I'm running keycloak-angular in a standalone app with keycloak-angular and the (working) following configuration/initialization:
Keycloak.init function:
AuthModule (first loaded):
If I try to share the keycloak-js in webpack (to federate the module) like this:
I'll get the following error (The share that causes the issue is keycloak-js):
This is in the "shell" frontend, the one that is over all the other frontends. As I know the only way to share the same instance is by sharing the module. At this time I'm passing the token to the mfe via an external service library or through localStorage , the single frontend have an independent keycloak.init in the app.module (as in federation I'm passing the child module).
Thanks
Versions.
keycloak-angular 12.1.0
keycloak-js 19.0.2
Repro steps.
Add the keycloak-js to the shares of module federation
Desired functionality.
I'd like to know if there's a way to share the keycloak instance to use widely the keycloak-angular and get all the features on the single microfrontends, firstly the AuthGuard.
All reactions