Exemple #1
0
        public async Task <bool> IsPhoneNumberRegisteredAsync(string phoneNumber)
        {
            if (string.IsNullOrWhiteSpace(phoneNumber))
            {
                throw new ArgumentNullException(nameof(phoneNumber));
            }

            await ConnectAsync();

            string normalizedPhoneNumber = phoneNumber.TrimStart('+');

            AuthCheckedPhoneConstructor checkPhoneResult = await _client.CheckPhone(normalizedPhoneNumber);

            return(checkPhoneResult.phoneRegistered);
        }