public async Task SignOutAsync([FromServices] AnalyticsClient analyticsClient) { await signInManager_.SignOutAsync(); logger_.LogInformation("User logged out."); analyticsClient.SendLogoutEvent(); }
public async Task <IActionResult> OnPost(string returnUrl = null, string mobile = null) { await _signInManager.SignOutAsync(); _logger.LogInformation("User logged out."); _analyticsClient.SendLogoutEvent(); if (returnUrl != null) { return(RedirectToPage("./Redirect", new { redirectUrl = returnUrl, mobile })); } else { return(RedirectToPage("./Login", new { mobile })); } }