Пример #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            var success = await _apiClient.AddPlayerAsync(Player);

            if (!success)
            {
                ModelState.AddModelError("", "There was an issue creating the player for this user.");
                return(Page());
            }

            User.MakePlayer();
            await HttpContext.SignInAsync(IdentityConstants.ApplicationScheme, User);

            return(RedirectToPage("/Index"));
        }