Build the future of communications.
Start building for free
  • By Andrew Lock
    Verifying Phone Number Ownership in ASP.NET Core Identity with Twilio Verify v2 and Razor Pages Copy of Product Template - Verify.png

    ASP.NET Core Identity is a membership system that adds user sign in and user management functionality to ASP.NET Core apps. It includes many features out of the box and has basic support for storing a phone number for a user. By default, ASP.NET Core Identity doesn't try to verify ownership of phone numbers, but you can add that functionality yourself by integrating Twilio’s identity verification features into your application.

    In this post you'll learn how you can prove ownership of a phone number provided by a user using Twilio Verify in an ASP.NET Core application using Razor Pages. This involves sending a code in an SMS message to the provided phone number. The user enters the code received and Twilio confirms whether it is correct. If so, you can be confident the user has control of the provided phone number.

    You typically only confirm phone ...

    Read More
  • By Andrew Lock
    Verifying Phone Number Ownership with Twilio using ASP.NET Core Identity and Razor Pages N42fIkogDGzNKe3tTttod6s49R0D_TquDiukriib9G7KUp0fhtSttA-AZYmGRfdERxp3Lp0IS_QXjf8C6lULRL8n9NJlsncTExtblcjvVKpnhxeYQmZHjgoG3mH2mVizLs671HE8

    ASP.NET Core Identity is a membership system that adds user sign in and user management functionality to ASP.NET Core apps. It includes many features out of the box and has basic support for storing a phone number for a user. By default, ASP.NET Core Identity doesn't try to verify ownership of phone numbers, but you can add that functionality yourself by integrating Twilio’s identity verification features into your application.

    In this post you’ll learn how you can prove ownership of a phone number provided by a user using Twilio Verify in an ASP.NET Core application using Razor Pages. This involves sending a code in an SMS message to the provided phone number. The user enters the code received and Twilio confirms whether it is correct. If so, you can be confident the user has control of the provided phone number.

    You typically only confirm ...

    Read More
  • By Andrew Lock
    Validating Phone Numbers in ASP.NET Core Identity Razor Pages with Twilio Lookup jJAt8sHYfRM3ssF9aSAHN52HxyZsonN5XKxWnwkfKLnEuy4FESw5bxhjSsu6wgfkHV9yT5rw6L5Pq08gGizy4RkrJkg7W8vn-pD1nxvL-kn7uB98Yawf9RidqMUUfjh_YgVxtbQV

    ASP.NET Core Identity is a membership system that adds login and user functionality to ASP.NET Core apps. It includes many features out of the box and has basic support for storing a phone number for a user. You can improve the robustness of ASP.NET Core’s phone number validation and provide a better user experience by integrating Twilio’s telephony features in your application.

    By default the phone number in ASP.NET Core Identity is validated with a regular expression, but that's too basic to confirm whether the number is really valid, whether it includes the country dialling code, or whether it can receive SMS messages. You could implement improved validation using the library libphonenumber-csharp, as described in a previous Twilio blog post. Alternatively you could use various Twilio APIs to thoroughly validate the phone number, lookup details about the number (such as carrier or type), and ...

    Read More
  • By Andrew Lock
    Getting Started with ASP.NET Core Razor Pages k0LUd743afoau8rVAWsoBcjYe8eQ12rfi9e9Fz93SLtecjU9MGX4mqClCBpIVeCPZ6ZdgMCvsy6ur_wBafA5HuTJsb4l6-zPzfVRDe8VJIEoSwxDeSUzylK6q5VrWRyvk97k8S-v

    Razor Pages is a new aspect of ASP.NET Core MVC introduced in ASP.NET Core 2.0. It offers a "page-based" approach for building server-side rendered apps in ASP.NET Core and can coexist with "traditional" MVC or Web API controllers. In this post I provide an introduction to Razor Pages, the basics of getting started, and how Razor Pages differs from MVC.

    Razor Pages vs MVC

    If you've used ASP.NET Core for building server-side rendered apps, then you'll be familiar with the traditional Model-View-Controller (MVC) pattern. Razor Pages provides an abstraction over the top of MVC, which can make it better suited to some page-based apps.

    In MVC, controllers are used to group similar actions together. When a request is received, routing directs the request to a single action method. This method typically performs some processing, and returns an IActionResult, commonly a ViewResult or a RedirectResult. If ...

    Read More
  • By Andrew Lock
    Using Dependency Injection with Twilio SMS and ASP.NET Core 2.1 ZdeD78FVVL4wmAcX96eAdT83x8oPPOyBmueXsBcLwGSvVLefBZ4HHP_o5Z04pJVXtD_QKjlpIYC1eYTnUum5ZiVkADYKfIMPsyvhdtonM5R4OW78xytGdBnOYGGSXhK7MG0mhI8S

    ASP.NET Core is built with first-class support for dependency injection (DI). It's used heavily by the framework, but you can also use it with your own classes. The Twilio C# helper libraries are largely static, so you don't have to use DI, but sometimes you might want to. For example, you might want to create a custom TwilioRestClient that uses the HttpClientFactory features of .NET Core 2.1. In this post, I describe how to create a custom ITwilioRestClient, register it with the ASP.NET Core DI container, and inject it into a web API controller, so you can use it to send an SMS.

    Prerequisites

    To follow along with this post you'll need:

    You ...

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.