I've got 2 APP_INITIALIZER providers... the first makes an HTTP request to get environment information.
The second uses the environment info to authorize the user against an OIDC Authority server endpoint (obtained from environment call).
It seems like, despite making the environment service a dependency of the authorization service, the authorization service's APP_INITIALIZER factory function is called before the environment call is completed.
{ provide: APP_INITIALIZER, multi: true, useFactory: EnvironmentFactory, deps: [] }
{ provide: APP_INITIALIZER, multi: true, useFactory: AuthorizationFactory, deps: [EnvironmentProvider] }
Both factories provided to APP_INITIALIZER are of the signature:
Factory() { return () => Promise; }
The result is that the authorization call submits to undefined
instead of a proper URL.
I've thought of combining the factories - but they are in two different modules so it feels messy. Guidance appreciated!