/account-security-quickstart-django

A simple implementation of a Twilio Account Security protected site using Python and Django.

Primary LanguagePythonMIT LicenseMIT

Twilio

Twilio Account Security Quickstart - Two-Factor Authentication and Phone Verification

We are currently in the process of updating this sample template. If you are encountering any issues with the sample, please open an issue at github.com/twilio-labs/code-exchange/issues and we'll try to help you.

Build Status

A simple Python and Django implementation of a website that uses Twilio Account Security services to protect all assets within a folder. Additionally, it shows a Phone Verification implementation.

It uses four channels for delivery: SMS, Voice, Soft Tokens, and Push Notifications. You should have the Authy App installed to try Soft Token and Push Notification support.

Learn more about Account Security and when to use the Authy API vs the Verify API in the Account Security documentation.

Two-Factor Authentication Demo

  • URL path "/protected" is protected with both user session and Twilio Two-Factor Authentication
  • One Time Passwords (SMS and Voice)
  • SoftTokens
  • Push Notifications (via polling)

Phone Verification

  • Phone Verification
  • SMS or Voice Call

Setup

  • Clone this repo
  • Run pip install -r requirements.txt
  • Register for a Twilio Account.
  • Setup an Account Security app via the Twilio Console.
  • Grab an Application API key from the Dashboard and paste it in .env.example
  • Save the .env.example file as .env
  • source .env to add the environmental variables
  • Run ./manage.py runserver from the cloned repo to run the app

Meta

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