コード例 #1
0
        public async Task SignOutAsync([FromServices] AnalyticsClient analyticsClient)
        {
            await signInManager_.SignOutAsync();

            logger_.LogInformation("User logged out.");
            analyticsClient.SendLogoutEvent();
        }
コード例 #2
0
        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 }));
            }
        }