private void VerifyLogin() { responseBox.gameObject.SetActive(true); if (!Utils.IsValidEmail(emailInput.text)) { responseBox.text = "<color=red>Invalid email!"; return; } else if (string.IsNullOrEmpty(passwordInput.text)) { responseBox.text = "<color=red>Please enter a password!"; return; } VerifyHandler verify = new VerifyHandler(emailInput.text, passwordInput.text); if (verify.SendRequest()) { responseBox.text = "<color=green>Successfully logged in!"; Account.set(emailInput.text, passwordInput.text); Account.onAccountChange(); Destroy(this.gameObject); } else { responseBox.text = "<color=red>Invalid Login!"; } }
public static bool verify() { if (credentials == null) { return(false); } var verify = new VerifyHandler(credentials.guid, credentials.password); return(verify.SendRequest()); }