Use Microsoft httpclient factory

Something is going wrong with authentication now, It apears that I get into some sort of inifte loop with the debugger between line 53 and 50

Produces a lot of “Start Processing logs” and then an exception so long I cannot scorll back to the top in the console to actually see iy

Okay, I will have a look. Sounds like an infinite loop. Have you configured something? A retry or so?

Not currently, I did that when using my own http factory, but was testing without overrides

Okay, it is fixed. The authenticator has intercepted its own calls and therefore causing an loop.

Just confirmed, for the scenario where you have 1 app everything works as expected :slight_smile:

In scenario that you work over multiple apps (i.e. you could do a copy of content between apps)

var squidexOptions = new SquidexOptions()
return new SquidexClientManager(squidexOptions);

It gets a bit harder due too the HttpClientFactory using the DI variant.
Need to look into that a bit more, perhaps for my scenario I need a custom IAuthenticator that uses an AsyncLocal.

PS
I noted that every method except AddSquidexHttpClient is an extension method, s this on purpose?

We could also make a bigger rebuild with the new version:

  1. Provide options where you can configure multiple apps
  2. Get rid of all older interfaces.

Or just a named registration?

Those are good ideas imo :slight_smile:
Think 1,2 offer more flexibility then named configuration.

I added support for app specific credentials:

Does this help?

I have pushed that no nuget as 10.0.1

1 Like

Thank you so much for spending time on this :slight_smile:
And glad to have been the push, since you said you wanted to do this for a while :slight_smile:

1 Like