Can't get Angular dynamic config to work

I’m trying to migrate from @auth0/auth0-spa-js to @auth0/auth0-angular but I’m having trouble getting the dynamic configuration to work.

I’m following the documentation here: GitHub - auth0/auth0-angular: Auth0 SDK for Angular Single Page Applications

I’ve set up a config loader service that retrieves a config.json file from the server, calls AuthClientConfig.set(...) and then resolves the Promise, and I expect Auth0 to be instantiated after that, but when I try it I get this error:

Error: Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set

I wrote up a more thorough explanation and a StackBlitz example on StackOverflow: auth0 - Angular imported modules do not wait for APP_INITIALIZER - Stack Overflow

Have other people had success following the documentation? Are there some easy mistakes that I should be aware of? Any pointers would be very much appreciated!