Пример #1
0
        public async Task <IActionResult> OnPost()
        {
            if (ModelState.IsValid)
            {
                var user = await _userManager.FindByNameAsync(LoginModel.Username);

                if (user != null && await _userManager.CheckPasswordAsync(user, LoginModel.Password))
                {
                    return(await HandleMerge(user, Url.Page("MergeConfirmation")));
                }

                ModelState.AddModelError(string.Empty, "Invalid credentials");
            }

            await GetMergeLoginViewModel();

            return(Page());
        }