Skip to content

AuthySE/signal-2019-python-authy-verify

Repository files navigation

Twilio Account Security Demo Site - 2FA and Phone Verification in Python

- Notice: this is a starter project for the SIGNAL 2019 Account Security Workshop.

Implement the missing code in utils.py or for the final working version, check out the finished branch.

About

A Python/Flask implementation demonstrating Twilio's Account Security APIs:

  • Lookup (phone number information)
  • Verify (phone verification)
  • Authy (two factor authentication)

Setup

Pre-Reqs

Follow our instructions for how to set up your Python and Flask development environment.

This project uses Python3.

Installation

Quick copy for unix:

git clone https://github.com/robinske/account-security-python-demo
cd account-security-python-demo
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
cp demo.env.example demo.env
cp db.json.example db.json
export FLASK_ENV=development
flask run

Step by step installation:

Clone this repo

git clone https://github.com/robinske/account-security-python-demo

If you're not familiar with Python virtual environments, follow our tutorial for setting up your local Python environment. Navigate into the project folder and create your virtual environment.

cd account-security-python-demo

python3 -m venv venv
source venv/bin/activate

pip3 install -r requirements.txt

Copy demo.env.example to demo.env. This is where we'll store sensitive data in environment variables.

cp demo.env.example demo.env
cp db.json.example db.json

Open the demo.env file and fill in your credentials. You can find these in the Twilio Console. Create an Authy Application (AUTHY_API_KEY) in the Authy Console.

Run the application

export FLASK_ENV=development
flask run

Or on Windows cmd:

set FLASK_ENV=development
flask run

Navigate to http://localhost:5000. If your credentials are set up correctly you'll soon get a message that the app is up!

License

MIT

About

Signal 2019 Account Security Workshop - Python Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published