scheb / 2fa
Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)
Installs: 415 757
Dependents: 1
Suggesters: 0
Security: 0
Stars: 512
Watchers: 11
Forks: 76
Open Issues: 8
Type:symfony-bundle
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0
- ext-json: *
- lcobucci/clock: ^3.0
- lcobucci/jwt: ^5.0
- spomky-labs/otphp: ^11.0
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/property-access: ^6.4 || ^7.0
- symfony/security-bundle: ^6.4 || ^7.0
- symfony/twig-bundle: ^6.4 || ^7.0
Requires (Dev)
- doctrine/coding-standard: ^12.0
- doctrine/persistence: ^1.3 || ^2.0 || ^3.0
- egulias/email-validator: ^4.0
- phpunit/phpunit: ^10.1
- psr/container: >=1.1
- squizlabs/php_codesniffer: ^3.5
- symfony/mailer: ^6.4 || ^7.0
- symfony/yaml: ^6.4 || ^7.0
- vimeo/psalm: ^5.0
Conflicts
Replaces
- scheb/2fa-backup-code: ^6.0
- scheb/2fa-bundle: ^6.0
- scheb/2fa-email: ^6.0
- scheb/2fa-google-authenticator: ^6.0
- scheb/2fa-totp: ^6.0
- scheb/2fa-trusted-device: ^6.0
- 7.x-dev
- v7.6.0
- v7.5.0
- v7.4.0
- v7.3.1
- v7.3.0
- v7.2.0
- v7.1.0
- v7.0.0
- 6.x-dev
- v6.13.0
- v6.12.0
- v6.11.0
- v6.10.0
- v6.9.0
- v6.8.0
- v6.7.0
- v6.6.0
- v6.5.0
- v6.4.0
- v6.3.0
- v6.2.0
- v6.1.0
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- 5.x-dev
- v5.13.2
- v5.13.1
- v5.13.0
- v5.12.1
- v5.12.0
- v5.11.0
- v5.10.1
- v5.10.0
- v5.9.0
- v5.8.1
- v5.8.0
- v5.7.0
- v5.6.0
- v5.5.0
- v5.4.2
- v5.4.1
- v5.4.0
- v5.3.1
- v5.3.0
- v5.2.1
- v5.2.0
- v5.1.4
- v5.1.3
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.1
- v5.0.0
- dev-6.x-refesh
This package is auto-updated.
Last update: 2024-11-29 19:35:42 UTC
README
This bundle provides two-factor authentication for your Symfony application.
ℹ️ The repository contains bundle versions ≥ 5, which are compatible with Symfony 4.4 or later. The older (unsupported) versions are located in the scheb/two-factor-bundle repository.
The bundle is split into sub-packages, so you can choose the exact feature set you need and keep installed dependencies to a minimum.
Core features are provided by scheb/2fa-bundle
:
- Interface for custom two-factor authentication methods
- Trusted IPs
- Multi-factor authentication (more than 2 steps)
- CSRF protection
- Whitelisted routes (accessible during two-factor authentication)
- Fully customizable conditions when to perform two-factor authentication
- Supports the new authenticator-based security system, introduced in Symfony 6, as well as the legacy system.
Additional features:
- Trusted devices (once passed, no more two-factor authentication on that device) (
scheb/2fa-trusted-device
) - Single-use backup codes for when you don't have access to the second factor device (
scheb/2fa-backup-code
) - QR codes to scan with your mobile device
Two-factor authentication methods:
- TOTP authentication (
scheb/2fa-totp
) - Google Authenticator (
scheb/2fa-google-authenticator
) - Authentication code via email (
scheb/2fa-email
)
Installation
Follow the installation instructions.
Documentation
Detailed documentation of all features can be found on the Symfony Bundles Documentation website.
Demo
This repository contains a small test application that can be quickly set-up locally to test two-factor authentication
in a real Symfony environment. Check out the readme file in the app
folder for more details.
Version Guidance
License
This software is available under the MIT license.
Security
For information about the security policy and know security issues, see SECURITY.md.
Contributing
Want to contribute to this project? See CONTRIBUTING.md.
Support Me
I'm developing this library since 2014. I love to hear from people using it, giving me the motivation to keep working on my open source projects.
If you want to let me know you're finding it useful, please consider giving it a star ⭐ on GitHub.
If you love my work and want to say thank you, you can help me out for a beer 🍻️ via PayPal.