Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

ARCHIVED - Add Two-Factor Authentication To Your Website with Google Authenticator and Twilio SMS

Notifications You must be signed in to change notification settings

TwilioDevEd/blog-tfa-servlets

Repository files navigation

Twilio

Deprecated Tutorial - Please use Twilio Verify

For new development, we encourage you to use the Verify API. The Verify API is an evolution of the Authy API with continued support for SMS, voice, and email one-time passcodes, and an improved developer experience.

For more about Twilio Verify, please visit the Twilio Verify Docs

Blog TFA Post - Java/Servlets

Java Servlet CI

Set up

Requirements

  1. Java 8 installed in your operative system.
  2. A Twilio account with a verified phone number. (Get a free account here.) If you are using a Twilio Trial Account, you can learn all about it here. 1.ngrok
  3. PostgreSQL

Twilio Account Settings

This application should give you a ready-made starting point for writing your own appointment reminder application. Before we begin, we need to collect all the config values we need to run the application:

Config Value Description
Account Sid Your primary Twilio account identifier - find this in the Console.
Auth Token Used to authenticate - just like the above, you'll find this here.
Phone number A Twilio phone number in E.164 format - you can get one here

Local development

  1. First clone this repository and cd into it.

    git clone git@github.com:TwilioDevEd/blog-tfa-servlets.git
    cd blog-tfa-servlets
    
  2. Copy the sample configuration file and edit it to match your configuration.

    cp .env.example .env

    See Twilio Account Settings to locate the necessary environment variables.

  3. Make sure the all tests succeed.

    ./gradlew integrationTest
  4. Run the application.

    ./gradlew appRun

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

About

ARCHIVED - Add Two-Factor Authentication To Your Website with Google Authenticator and Twilio SMS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages