private async void RegisterUser(string username, string password, string confirmPassword) { using (var client = new AccountClient(GlobalProperties.BaseUrl)) { var result = await client.Register(username, password, confirmPassword); if (result) { Response.Redirect("~/Pages/Account/Login.aspx"); } } }
private async void DoLogin(string email, string password) { TokenModel token = null; using (var client = new AccountClient(GlobalProperties.BaseUrl)) { token = await client.Login(email, password); } if (token == null) { return; } Session["IsLoggedIn"] = true; Session.Add("Token", token); Response.Redirect("~/Default.aspx"); }