Download the PHP package vivanwebsolution/sylius-2fa-plugin without Composer
On this page you can find all versions of the php package vivanwebsolution/sylius-2fa-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sylius-2fa-plugin
Sylius 2FA Google Authenticator Plugin
This plugin enables Google Two-Factor Authentication (2FA) for Sylius 2.0 Admin Users using:
It allows admins to secure their accounts with Google Authenticator time-based one-time passwords (TOTP).
Features
- Seamless integration of Google Authenticator for 2FA on Sylius Admin Users
- Admin UI toggle to enable/disable 2FA per user
- AJAX-enabled toggle with CSRF protection
- Extends the Sylius
AdminUserentity to supportTwoFactorInterface - QR code generation for quick mobile setup using
endroid/qr-code
Requirements
- Sylius 2.0
- PHP 8.x
- Composer
Installation
1. Install via Composer
2. Enable the Bundle
In config/bundles.php, register the bundle:
3. Configure the Bundle
Create the config file at config/packages/scheb_2fa.yaml:
To clear the Symfony cache, run:
4. Extend the AdminUser Entity
Modify your AdminUser entity to implement the 2FA interface:
5. Run Database Migrations
Ensure your database is configured, then run:
6. Override the Admin User Form Template
Create or override the following template:
Include the 2FA section:
7. Configure Routes
Add the plugin routes to config/routes.yaml:
Usage
-
Log in to the Sylius Admin panel.
-
Navigate to the Admin User detail page.
-
Use the checkbox in the "Two-Factor Authentication" section to enable or disable Google 2FA for that admin user.
- When 2FA is enabled, the user will be prompted to enter a Google Authenticator code after logging in with their credentials.
References
- Scheb Two Factor Bundle – Provides two-factor authentication support for Symfony.
- Scheb Google Authenticator – Adds Google Authenticator support to the Scheb bundle.
- Endroid QR Code – Used for generating QR codes for Google Authenticator setup.
Functionality Screenshot
© Vivan Web Solution — Open-source Sylius plugin for 2FA with Google Authenticator
All versions of sylius-2fa-plugin with dependencies
endroid/qr-code Version ^6.0
scheb/2fa-bundle Version ^7.10
scheb/2fa-google-authenticator Version ^7.10
spomky-labs/otphp Version ^11.3
sylius/sylius Version ~2.0.0