Setup Simple Injector with ASP.NET Identity 2.2.1
<p>So I've been trying to setup ASP.NET Identity 2.2.1 and I keep hitting roadblocks.  For being something that is supposed to be auto-generated by the framework it sure seems complicated to configure.  I think I'm almost there but I'm still having issues setting up IoC with Simple Injector.</p>

<p>I've been reading through other StackOverflow questions and blogs about these issues.  Most of them seem out of date because they deal with ASP.NET Identity 1.0.  There's even been enough changes from 2.0 to 2.2.1 I've run into some issues with out of date solutions.  Or the solutions deal with other IoC frameworks and I just can't translate them to Simple Injector. I've used other IoC Frameworks but I'm new to Simple Injector.</p>

<p><strong>UPDATE</strong> - <a href="https://stackoverflow.com/questions/37085776/setup-simple-injector-with-asp-net-identity-2-2-1#comment61716120_37085776">Ric .Net's first link in his comment</a> was very helpful.  I've reformatted my work to fit his suggestions and I think I'm almost there.  But I'm still having one issue.  I've completed replaced the previous code with the code below.</p>

<p><strong>1)</strong> I updated <strong>ApplicationDbContext</strong>:</p>

<pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
{
    public ApplicationDbContext(string connectionstring)
        : base(connectionstring, throwIfV1Schema: false)
    {
    }
}
</code></pre>

<p><strong>2)</strong> I removed the Create() method from <strong>ApplicationUserManager</strong> and moved it into a class that initializes all of my Simple Injector code:</p>

<pre><code>public static class SimpleInjectorInitializer
{
    public static Container Initialize(IAppBuilder app)
    {
        var container = GetInitializeContainer(app);

        container.Verify();

        DependencyResolver.SetResolver(
            new SimpleInjectorDependencyResolver(container));

        return container;
    }

    public static Container GetInitializeContainer(
              IAppBuilder app)
    {
        var container = new Container();

        container.RegisterSingle&lt;IAppBuilder&gt;(app);

        container.RegisterPerWebRequest&lt;
               ApplicationUserManager&gt;();

        container.RegisterPerWebRequest&lt;ApplicationDbContext&gt;(() 
          =&gt; new ApplicationDbContext(
           "Your constring goes here"));

        container.RegisterPerWebRequest&lt;IUserStore&lt;
          ApplicationUser&gt;&gt;(() =&gt; 
            new UserStore&lt;ApplicationUser&gt;(
              container.GetInstance&lt;ApplicationDbContext&gt;()));

        container.RegisterInitializer&lt;ApplicationUserManager&gt;(
            manager =&gt; InitializeUserManager(manager, app));

        container.RegisterMvcControllers(
                Assembly.GetExecutingAssembly());

        return container;
    }

    private static void InitializeUserManager(
        ApplicationUserManager manager, IAppBuilder app)
    {
        manager.UserValidator = 
         new UserValidator&lt;ApplicationUser&gt;(manager)
        {
            AllowOnlyAlphanumericUserNames = false,
            RequireUniqueEmail = true
        };

        //Configure validation logic for passwords
        manager.PasswordValidator = new PasswordValidator()
        {
            RequiredLength = 6,
            RequireNonLetterOrDigit = false,
            RequireDigit = true,
            RequireLowercase = true,
            RequireUppercase = true,
        };

        var dataProtectionProvider = 
             app.GetDataProtectionProvider();

        if (dataProtectionProvider != null)
        {
            manager.UserTokenProvider = 
             new DataProtectorTokenProvider&lt;ApplicationUser&gt;(
              dataProtectionProvider.Create("ASP.NET Identity"));
        }
    }
}
</code></pre>

<p><strong>3)</strong> I changed the Configuration method in <strong>Startup.cs</strong>:</p>

<pre><code>public void Configuration(IAppBuilder app)
{
    var container = SimpleInjectorInitializer.Initialize(app);
    ConfigureAuth(app, container);
}
</code></pre>

<p><strong>4)</strong>  I updated ConfigureAuth in <strong>Configure.Auth.cs</strong>:</p>

<pre><code>public void ConfigureAuth(IAppBuilder app, Container container)
{
    // Configure the db context and user manager to use a single instance per request
    //app.CreatePerOwinContext(ApplicationDbContext.Create);
    app.CreatePerOwinContext(container.GetInstance&lt;ApplicationUserManager&gt;);
    // Rest of code here ...
</code></pre>

<p><strong>5)</strong> Then I removed the default constructor and UserManager property from AccountsController.</p>

<p>The problem I'm having now is that since ASP.NET Identity 2.0, they have added the parameter <code>ISecureDataFormat&lt;AuthenticationTicket&gt; accessTokenFormat</code> to the AccountsController constructor.</p>

<pre><code>public AccountController(ApplicationUserManager userManager, 
    ISecureDataFormat&lt;AuthenticationTicket&gt; accessTokenFormat)
</code></pre>

<p>So now, how do I add DI for <code>ISecureDataFormat&lt;AuthenticationTicket&gt;</code> in Simple Injector?</p>