public override async Task <bool> CheckCredentails(string username, string password) { try { if (string.IsNullOrWhiteSpace(username)) { throw new Exception("Invalid Username"); } if (string.IsNullOrWhiteSpace(password)) { throw new Exception("Invalid Password"); } Response = await SmartThingsApi.GetTokenFromCredentials(client, loginUrl, username, password); FoundAuthCode(Response.AccessToken); Username = username; Password = password; return(true); } catch (Exception ex) { Console.WriteLine(ex); } return(false); }