using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.Logging; using Console = HyperCube.Utils.AdvConsole; namespace HyperCube.Areas.Identity.Pages.Account { [AllowAnonymous] public class LogoutModel : PageModel { private readonly SignInManager _signInManager; //private readonly ILogger _logger; public LogoutModel(SignInManager signInManager, ILogger logger) { _signInManager = signInManager; //_logger = logger; } public async Task OnGet() { await _signInManager.SignOutAsync(); //_logger.LogInformation("User logged out."); Console.WriteLine("User logged out."); return LocalRedirect("~/"); } } }