Example #1
0
        public async Task <IActionResult> ConnectMinecraft()
        {
            var user = await _userManager.GetUserAsync(User);

            if (user == null)
            {
                throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
            }

            string key = _connectionHandler.GenerateAPIKey(user.Id);

            ViewData["key"] = key;

            return(View());
        }