public async Task<IActionResult> Logout(IdentityServerLogoutViewModel model)
        {
            // delete authentication cookies
            await signInManager.SignOutAsync();

            // set this so UI rendering sees an anonymous user
            HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity());

            // get context information (client name, post logout redirect URI and iframe for federated signout)
            var logoutModel = await identityServerIntegration.GetLogoutContextModelAsync(model.LogoutId);

            
            return View("LoggedOut", logoutModel);
        }
        public async Task<IActionResult> Logout(string logoutId)
        {
            var clientId = await identityServerIntegration.GetLogoutContextClientIdAsync(logoutId);
            if (!string.IsNullOrEmpty(clientId))
            {
                // if the logout request is authenticated, it's safe to automatically sign-out
                return await Logout(new IdentityServerLogoutViewModel { LogoutId = logoutId });
            }

            var vm = new IdentityServerLogoutViewModel
            {
                LogoutId = logoutId
            };

            return View(vm);
        }