Browse Source

Enable trust option so user isn't prompted for 2FA within 30 days

Colin O'Dell 5 years ago
parent
commit
e317e8fd5f

+ 1 - 1
app/Resources/SchebTwoFactorBundle/views/Authentication/form.html.twig

@@ -22,7 +22,7 @@
                 </div>
 
                 {% if displayTrustedOption %}
-                    <p class="widget"><label for="_trusted"><input id="_trusted" type="checkbox" name="{{ trustedParameterName }}" /> {{ "trusted"|trans({}, 'SchebTwoFactorBundle') }}</label></p>
+                    <div class="checkbox"><label for="_trusted"><input id="_trusted" type="checkbox" name="{{ trustedParameterName }}" /> Trust this computer for 30 days</label></div>
                 {% endif %}
 
                 <input type="submit" class="btn btn-block btn-primary btn-lg" value="{{ "login"|trans({}, 'SchebTwoFactorBundle') }}" />

+ 4 - 0
app/config/config.yml

@@ -146,6 +146,10 @@ scheb_two_factor:
         issuer: Packagist
         window: 1
 
+    trusted_device:
+        enabled: true
+        lifetime: 2592000 # 30 days
+
 nelmio_cors:
     defaults:
         allow_origin: ['*']