This bundle provides two-factor authentication for your Symfony application.
- Installation
- Configuration Reference
- Trusted Devices
- Backup Codes
- Brute Force Protection
- CSRF Protection
- Events
- Troubleshooting (common issues)
How-to's:
- How to create a custom two-factor authenticator
- How to handle multiple activated authentication methods
- How to configure two-factor authentication for an API
- How to create a custom persister
The bundle supports the following authentication methods out of the box:
See Providers for more information about custom or third-party provider.
The bundle hocks into security layer and listens for authentication events. When a login happens and the user has two-factor authentication enabled, access and privileges are temporary withhold from the user. Instead, the user is challenged to enter a valid two-factor authentication code. Only when that code is entered correctly, the roles are granted.
To represent the state between login and a valid two-factor code being entered, the bundle introduces the role-like
attribute IS_AUTHENTICATED_2FA_IN_PROGRESS
, which can be used in is_granted()
calls. IS_AUTHENTICATED_FULLY
is,
just like roles, withhold until the two-factor authentication step has been completed successfully.