-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The config.json is not finished loading before other modules are! #52
Comments
What I do for this is put the auth config inside the config.json file that is loaded in RuntimeConfigLoaderModule. And then in the code I get the //app.component.ts
const authConfig = this._config.getConfigObjectKey('authModuleConfig');
this._oauth.configure(authConfig); Does this answer the question? I've used this several times, in several apps, and it always works. |
I don't know exactly how you're loading the Auth configuration, but like I said, in my I don't know of any way to make the In your case, if you're trying to load the config from a JSON file in that factory, I'd just load the JSON file directly and not try to get it from the runtime config loader. |
I'm facing the same issue as mentioned in the documentation:
In some cases, the config.json is not finished loading before other modules/services are, so the above methods will return null. If that is the case, subscribe to the configSubject and access the configuration object that way.
I'm using runtime-config-loader to load the config file for angular-auth-oidc-client's AuthModule!
but I couldn't use configSubject and couldn't find any sample code for using it! Maybe a sample code solves my problem!
I mean I tried subscribing to configSubject but it's still null!
The text was updated successfully, but these errors were encountered: