Is there a way to dynamically load okta config variables during runtime in Angular

I have these variables but they change depending on the environment. Any ideas how to modify this?

const config = {
issuer: ‘’,
redirectUri:‘http://localhost:4200/implicit/callback’,
clientId: ‘’
};

You can try something like this: https://github.com/okta/okta-oidc-js/issues/308#issuecomment-451305204

I have been struggling with the same issue. I have an angular application that uses a dotnet backend. I have managed to configure the functional parts of the application to not rely on any kind of config file but rather from the response of an api call to the backend that returns values dynamically based on the environment of the dotnet code. The one place I can’t find a good way around the config file is in my app.module.ts file. Here, when setting up the dependencies with the providers it seems that the @NgModule section of code fires first before any other section of the angular code, thereby inhibiting me from getting those values from an API call. Any suggestions? I have to use the OktaAuthModule because it is critical to my application’s architecture. That makes the above solution not very applicable.

Hi Bristol, Have you had any luck on the problem ?