Reenable r/u2f-two-factor-bundle

This commit is contained in:
Jan Böhmer 2022-08-14 00:36:00 +02:00
parent 600119276c
commit 754926d4c8
10 changed files with 218 additions and 17 deletions

View file

@ -24,4 +24,5 @@ return [
Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true],
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
R\U2FTwoFactorBundle\RU2FTwoFactorBundle::class => ['all' => true],
];

View file

@ -1,4 +1,4 @@
#ru2_f_two_factor:
# formTemplate: "/security/U2F/u2f_login.html.twig"
# registerTemplate: "/security/U2F/u2f_register.html.twig"
# authCodeParameter: _auth_code
ru2_f_two_factor:
formTemplate: "/security/U2F/u2f_login.html.twig"
registerTemplate: "/security/U2F/u2f_register.html.twig"
authCodeParameter: _auth_code

View file

@ -2,14 +2,23 @@
scheb_two_factor:
google:
enabled: true
enabled: true # If Google Authenticator should be enabled, default false
server_name: '%partdb.title%' # Server name used in QR code
issuer: 'Part-DB' # Issuer name used in QR code
digits: 6 # Number of digits in authentication code
window: 1 # How many codes before/after the current one would be accepted as valid
template: security/2fa_form.html.twig
backup_codes:
enabled: true
enabled: true # If the backup code feature should be enabled
trusted_device:
enabled: true
enabled: true # If the trusted device feature should be enabled
lifetime: 5184000 # Lifetime of the trusted device token
extend_lifetime: false # Automatically extend lifetime of the trusted cookie on re-login
cookie_name: trusted_device # Name of the trusted device cookie
cookie_secure: false # Set the 'Secure' (HTTPS Only) flag on the trusted device cookie
cookie_same_site: "lax" # The same-site option of the cookie, can be "lax" or "strict"
security_tokens:
- Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken

View file

@ -5,3 +5,7 @@
2fa_login_check:
path: /{_locale}/2fa_check
r_u2f_register:
resource: "@RU2FTwoFactorBundle/Resources/config/routing.yml"
prefix: /{_locale}/user