private void IssueCookie(IEnumerable<Claim> enumerable, string authType, TimeSpan? tokenLifetime, bool? persistentCookie)
{
SignOut();
var props = new AuthenticationProperties();
if (tokenLifetime.HasValue) props.ExpiresUtc = DateTime.UtcNow.Add(tokenLifetime.Value);
if (persistentCookie.HasValue) props.IsPersistent = persistentCookie.Value;
var id = new ClaimsIdentity(enumerable, authType);
context.Authentication.SignIn(props, id);
}