@dexster/auth
v0.0.1
Published
How to s After creating the auth-lib, build it - ng build auth-lib npm link the dist/auth-lib dir npm link auth-lib in the shell app and the remote component app Add the lib as a shared plugin in webpack.config in shell and remote - auth-lib": { singleton
Downloads
2
Readme
Auth
How to s After creating the auth-lib, build it - ng build auth-lib npm link the dist/auth-lib dir npm link auth-lib in the shell app and the remote component app Add the lib as a shared plugin in webpack.config in shell and remote - auth-lib": { singleton: true, strictVersion: true, requiredVersion: 'auto' } Add an entry to package.json in both shell and remote otherwise the created share above gives errors. In prod this would not be necessary as you would install the auth lib and not link it - auth-lib": "0.0.1 Remove the @Injectable from the AuthService so that it is only instantiated once in the shell app. I also changed the user to an observable so that any updates to the username reflect immediately in federated modules. See AuthService code below Provide the AuthService in your app.module in the shell and remote - providers: [AuthService] Update your component and HTML to use the user$ property to view the user