Beispiel #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            string token = await _webApi.Login(Email, Password);

            if (!String.IsNullOrWhiteSpace(token))
            {
                UserDTO user = await _webApi.GetUser(token);

                HttpContext.Session.SetString("token", token);
                return(RedirectToPage("/Time"));
            }
            Message = "Invalid Login";
            return(Page());
        }