SMS Two-Factor Authentication (SMS-2FA) helps keep your user accounts secure by validating two "factors" of identity. Most login systems only validate a password known by the user. You can make it harder for evildoers to compromise a user account by also validating something a user has, such as their mobile phone.
This project is built using Flask web framework.
-
First clone this repository and
cdinto it.$ git clone [email protected]:TwilioDevEd/sms2fa-flask.git $ cd sms2fa-flask
-
Create a new virtual environment.
-
If using vanilla virtualenv:
virtualenv venv source venv/bin/activate -
If using virtualenvwrapper:
mkvirtualenv automated-survey
-
-
Install the dependencies.
pip install -r requirements.txt
-
Copy the sample configuration file and edit it to match your configuration.
$ cp .env.example .env
You can find your
TWILIO_ACCOUNT_SIDandTWILIO_AUTH_TOKENin your Twilio Account Settings. You will also need aTWILIO_NUMBER, which you may find here.Run
source .envto export the environment variables. -
Run the migrations.
Our app uses SQLite, so you probably will not need to install additional software.
python manage.py db upgrade
-
Make sure the tests succeed.
$ coverage run manage.py test -
Start the server.
python manage.py runserver
-
Check it out at: http://localhost:5000/.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.