I am using the AuthFeature and I feed it a custom CredentialsAuthProvider derived provider of my own (i.e. CustomProvider : CredentialsAuthProvider).
Like this:
appHost.Container.RegisterAutoWiredAs<MyDependency, IMyDependency>().ReusedWithin(ReuseScope.Request);
appHost.Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[]
{
new CustomProvider(
appHost.Container.Resolve<IAppSettings>(),
appHost.Container.Resolve<IMyDependency>())
}));
One of the dependencies of my CustomProvider is auto-wire-registered as ReuseScope.Request, but it is passed into the ctor of CustomProvider. As you can see above.
Clearly, the instance of this dependency is not being properly re-constructed every HTTP Request, and I am having problems each request.
How should I be injecting my dependency into my CustomProvider so that it will be resolved/recreated every HTTP Request?