Swapping Azure Web App deployment slots logs out all users in ASP.NET Core RC2
<p>Whenever I updated my ASP.NET Core RC2 website running on as an Azure Web App, it logs out all users. It seems to be related to swapping a staging deployment slot to production (I use web deploy from VS to staging, and have it set to auto-swap to production). If I do a direct update of the production slot it's fine, but I don't want to do that. I am at a loss as to how to configure this, help would be appreciated!</p>

<p>Here is how I have it configured right now, my site only allows logging in directly (no facebook login etc.):</p>

<p>In ConfigureServices in Startup</p>

<pre><code>// found some post that said this would help... doesn't seem to work...
services.AddDataProtection()
        .SetApplicationName("myweb");

services.AddIdentity&lt;MyUser, MyRole&gt;(options =&gt;
{
    options.Cookies.ApplicationCookie.CookieDomain = settings.CookieDomain; // cookie domain lets us share cookies across subdomains
    options.Cookies.ApplicationCookie.LoginPath = new PathString("/account/login");
    options.Cookies.ApplicationCookie.ReturnUrlParameter = "ret";
    options.Cookies.ApplicationCookie.CookieSecure = CookieSecureOption.Never; // TODO: revisit site-wide https

    // allow login cookies to last for 30 days from last use
    options.Cookies.ApplicationCookie.ExpireTimeSpan = TimeSpan.FromDays(60);
    options.Cookies.ApplicationCookie.SlidingExpiration = true;

    // I think this needs to at least be longer than cookie expiration to prevent security stamp from becoming invalid before the cookie?
    options.SecurityStampValidationInterval = TimeSpan.FromDays(90);
})
.AddUserStore&lt;MyUserStore&gt;() // custom stores to hook up our old databases to new identity system
.AddRoleStore&lt;MyRoleStore&gt;()
.AddDefaultTokenProviders();
</code></pre>

<p>And in Configure in Startup</p>

<pre><code>app.UseIdentity();
</code></pre>