Пример #1
0
        public async Task Can_launch_sms_flow()
        {
            // Arrange
            var authenticationApiClient = new AuthenticationApiClient(new Uri(GetVariable("AUTH0_PASSWORDLESSDEMO_AUTHENTICATION_API_URL")));

            // Act
            var request = new PasswordlessSmsRequest
            {
                ClientId = GetVariable("AUTH0_PASSWORDLESSDEMO_CLIENT_ID"),
                PhoneNumber = "your phone number"
            };
            var response = await authenticationApiClient.StartPasswordlessSmsFlowAsync(request);
            response.Should().NotBeNull();
            response.PhoneNumber.Should().Be(request.PhoneNumber);
        }
Пример #2
0
 public Task<PasswordlessSmsResponse> StartPasswordlessSmsFlow(PasswordlessSmsRequest request)
 {
     return Connection.PostAsync<PasswordlessSmsResponse>("passwordless/start",
         new
         {
             client_id = request.ClientId,
             connection = "sms",
             phone_number = request.PhoneNumber
         },
         null, null, null, null, null);
 }