Two Factor Authentication for TastyIgniter
Package: avisaas/twofactor
Compatibility/Notes: Works standalone — Compatible with TastyIgniter 4.x on PHP 8.2+.
The 2FA challenge appears on the same login page — no separate challenge page. After the admin submits their
username/password, the login form is replaced with a 6-digit code field inline. The user is kept on /admin/login
throughout.
Admins set up Google Authenticator from their own profile page (Admin Users → Edit Profile → Two Factor tab):
pragmarx/google2fa-laravel is installed with a one-click Install package
button that runs composer require in the backgroundThe setup page includes a live install button that runs composer require pragmarx/google2fa-laravel via PHP exec().
Output is shown in a scrollable terminal-style panel. The page reloads automatically after a successful install.
Works on shared hosting with:
HOME environment variable (uses HOME=/tmp COMPOSER_HOME=/tmp)composer.json requires PHP 8.3 (--ignore-platform-req=php)--no-scripts)The Settings → Setup tab runs a live security checklist on your server and application — no manual inspection needed.
Application Security
| Check | What it verifies |
|---|---|
| Database migrations applied | All 2FA columns exist in the database |
| 2FA globally enabled | The enable_2fa setting is on |
| Mail / SMS provider configured | A delivery method is set |
| APP_KEY set | Laravel encryption key is present |
| Debug mode disabled | APP_DEBUG=false in production |
| HTTPS in APP_URL | APP_URL starts with https:// |
| Cache driver | Not using array or null driver |
HTTP & Server Hardening
| Check | What it verifies |
|---|---|
| Sensitive files blocked | .env, .sql, .log requests are denied |
| Composer files blocked | composer.json, composer.lock are not publicly accessible |
| Double-extension uploads blocked | shell.php.jpg style uploads rejected |
| Storage: PHP execution blocked | PHP cannot execute inside the storage directory |
| X-Frame-Options: SAMEORIGIN | Clickjacking protection header present |
| Content-Security-Policy header | CSP header present |
| X-Content-Type-Options: nosniff | MIME sniffing protection |
| Referrer-Policy | strict-origin-when-cross-origin set |
| Permissions-Policy | Camera, microphone, geolocation disabled |
| X-Powered-By header removed | PHP version not leaked in response headers |
| Trailing slash redirect | Canonical URL redirect (301) active |
| Installer directory locked | Web installer is not publicly accessible |
One-click Apply Hardening button writes the missing rules to .htaccess automatically.
Configure SMS delivery under Settings → SMS:
| Provider | Credentials Required |
|---|---|
| Twilio | Account SID, Auth Token, From Number |
| Vonage (Nexmo) | API Key, API Secret, From Name/Number |
The Admin Users → Edit → Two Factor tab shows each user's current 2FA status:
Every feature is gated behind a valid license key. Without an active license:

Public versions are available at: https://github.com/avisaas/extension-screenshots/tree/main/twofactor
pragmarx/google2fa-laravel (installable via the one-click button in Settings → Setup)This extension is available for purchase from the Avisaas marketplace. After payment you will receive the extension files. Install them using one of the methods below.
avisaas/twofactor folder to extensions/avisaas/twofactor on your server.php artisan igniter:up
php artisan cache:clear
php artisan config:clear
php artisan view:clear
avisaas/twofactor folder via FTP to extensions/avisaas/twofactor.Go to System → Settings → Two Factor Authentication → License tab. Enter your license key and save. The status badge turns green when the key is valid.
Go to the General tab and toggle Enable Two Factor Authentication on.
Go to the SMS tab, select your provider (Twilio or Vonage), enter credentials, and save.
Each admin goes to Admin Users → Edit (own profile) → Two Factor tab → Setup Now. They scan the QR code with their authenticator app and enter the 6-digit code to confirm.
Commercial — requires a valid license key from avisaas.com.
One license per domain. License keys are validated against the domain set in APP_URL.
Other extensions and themes by AVi SaaS.
For developers
Create extensions or themes for TastyIgniter and earn revenue from the community. Join a growing ecosystem of developers building for restaurants worldwide.
Become an authorTwo Factor Authentication for TastyIgniter