Why Choose This Package?
While other 2FA solutions only protect your admin panel, ours goes further. We protect both your administrators AND your customers. Because security shouldn't be a privilege—it should be standard.
For Admin Panel
Mandatory 2FA: All administrators are required to enable 2FA. No exceptions, maximum security.
User Management: Reset 2FA for any user directly from the admin panel. Perfect when team members lose their devices.
Activity Logs: Track every 2FA event: activations, verifications, failed attempts, and resets. Know exactly what's happening with your security.
Email Notifications: Automatic alerts when 2FA is enabled or reset. Stay informed about security changes.
Command Line Tools: Reset 2FA via artisan commands for emergency situations or automated workflows.
For Customers (Shop)
Voluntary Activation: Customers can enable 2FA from their account security settings. No forced complexity.
Self-Service Recovery: Lost your phone? Use recovery codes or request a reset link via email. No support tickets needed.
Email Reset Link: One-click 2FA reset delivered to the registered email. Secure, simple, 10-minute expiration.
Seamless Login Flow: After login, customers verify their code and continue shopping. Clean, fast, no friction.
Security You Can Trust
AES-256 Encryption: All secrets encrypted in database using Laravel's encryption.
Hashed Recovery Codes: Recovery codes stored with bcrypt. Even database access won't expose them.
Signed URLs: Email reset links cryptographically signed and time-limited.
Session Protection: Automatic session regeneration after verification.
Universal Compatibility
Works With Any Authenticator App: Google Authenticator, Microsoft Authenticator, Authy, 1Password, or any TOTP-compatible app.
Multi-Language Support: Complete English and Spanish translations. Easy to add more languages.
Built for Bagisto 2.x: Native integration. Follows Bagisto conventions. Feels like part of the core.
What You Get
Complete admin 2FA system • Complete customer 2FA system • 8 recovery codes per user • QR code setup with manual entry fallback • Email notifications (activation & reset) • Email-based recovery for customers • Activity logging for admins • Artisan commands for management • Full English & Spanish translations • Clean, documented code • Easy installation
Installation
Complete installation in under 5 minutes with these simple steps. No complex configuration required.
Step 1: Extract & Configure Package
Extract the ZIP contents to packages/Encodyn/TwoFactorAuth/ in your Bagisto root directory.
Add to your composer.json under "autoload" -> "psr-4":
"Encodyn\\TwoFactorAuth\\": "packages/Encodyn/TwoFactorAuth/src"
Add to bootstrap/providers.php:
Encodyn\TwoFactorAuth\Providers\TwoFactorAuthServiceProvider::class,
Step 2: Install Dependencies & Run Migrations
Run these commands in your terminal:
composer require pragmarx/google2fa-laravel bacon/bacon-qr-code composer dump-autoload php artisan migrate php artisan optimize:clear
Step 3: Configure Email (Required)
Update your .env file with your mail server settings for email-based recovery to work:
MAIL_MAILER=smtp MAIL_HOST=your-smtp-host.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=your-password MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME="${APP_NAME}"
Done! Your Bagisto store is now protected with enterprise-grade two-factor authentication. Both admin users and customers can now enable 2FA from their account settings.
Who Is This For?
Store Owners: Protect your business from unauthorized access. Sleep better knowing your admin panel is secure.
Agencies: Deliver secure stores to your clients. Add value to every project.
Enterprise: Meet compliance requirements. Audit trails included.
Developers: Clean code, proper architecture, easy to extend.
Frequently Asked Questions
How long does installation take?
Less than 5 minutes.
Will it slow down my store?
No. Minimal overhead. Only active during authentication.
Can customers disable it?
Yes, with their password. Their choice, their control.
What if a customer loses everything?
Email reset link to their registered email. Self-service recovery.
Does it work with social login?
2FA triggers after any successful authentication method.
Ready to Secure Your Store?
Stop leaving your admin panel and customer accounts vulnerable. Add enterprise-grade security today.
Built with care by Encodyn
For Bagisto store owners who take security seriously.
Resources
Contact Information
Questions about this package should be sent to us at [email protected].