The "2-fa-demo" project is a reference application created to show how to implement 2-Factor Authentication on Symfony applications using Authy by Twilio.
- PHP 7.4 or higher
- PDO-SQLite PHP extension enabled;
- Git
- Composer
- Symfony CLI
- and the usual Symfony application requirements.
Download Symfony to install the symfony
binary on your computer and run
this command:
$ git clone https://github.com/ybjozee/2-fa-demo.git 2-fa-demo
$ cd 2-fa-demo
$ composer install
Make a local version of the .env
file
$ cp .env .env.local
Update the DATABASE_URL
and AUTHY_API_KEY
accordingly
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
AUTHY_API_KEY="INSERT_YOUR_PRODUCTION_API_KEY_HERE"
Set up your database
$ ./bin/console doctrine:database:create
$ ./bin/console doctrine:schema:update --force
run this command and access the application in your browser at the given URL (https://localhost:8000 by default):
$ symfony serve