Sample application that shows how to use Authy push authorization to validate actions like payment transactions.
Demo video showing how the application works
Sign up for a free Twilio account and create an Authy application in the console: https://www.twilio.com/console/authy/applications
Copy .env.example
to .env
and add your AUTHY_API_KEY
.
On Mac/Linux:
python3 -m venv venv
. venv/bin/activate
Or on Windows cmd:
py -3 -m venv venv
venv\Scripts\activate.bat
Install Requirements:
pip install -r requirements.txt
export FLASK_APP=payfriend
export FLASK_ENV=development
flask init-db
flask run
Or on Windows cmd:
set FLASK_APP=payfriend
set FLASK_ENV=development
flask init-db
flask run
You'll need a publicly accessible route that Authy can access. Download ngrok and run:
ngrok http 5000
Head back to the Authy Console and update your Application's Push Authentication callback URL with /payments/callback
appended.
Open http://127.0.0.1:5000 in a browser.