title: How to plug my Autofac container into ASP. NET Identity 2.1
body: <p>I have been looking into the new features of the new version of ASP.NET Identity 2.1 and one of its enhancements is the new IoC features integrated into the OWIN Middleware.
  One of the sentences that I looked in the examples is this one:</p>
  
  <pre><code>app.CreatePerOwinContext&lt;ApplicationUserManager&gt;(ApplicationUserManager.Create);
  </code></pre>
  
  <p>This sentence receives a function delegate which returns a new instance of a manager implementation provided on the examples:</p>
  
  <pre><code> public static ApplicationUserManager Create(IdentityFactoryOptions&lt;ApplicationUserManager&gt; options,
          IOwinContext context)
      {
          var manager = new ApplicationUserManager(new UserStore&lt;ApplicationUser&gt;(context.Get&lt;ApplicationDbContext&gt;())); 
  </code></pre>
  
  <p>I personally dont like this implementation because I am not able to use a container to inject any dependency that I want for these managers.</p>
  
  <p>Also there is an "IdentityFactoryOptions" and a "IOwinContext" that are "magically" injected to the function which Im not able to pull out into my IoC container.</p>
  
  <p>Do anyone have a better workaround on this implementation? </p>