diff --git a/app/config/config.yml b/app/config/config.yml
index 4a2c02bf9..956fdd07c 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -45,6 +45,7 @@ twig:
export_mobi: %export_mobi%
export_pdf: %export_pdf%
version: %app.version%
+ twofactor_auth: %twofactor_auth%
warning_message: %warning_message%
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
flattr_url: "https://flattr.com/thing/1265480"
@@ -179,7 +180,7 @@ scheb_two_factor:
cookie_lifetime: 2592000
email:
- enabled: true
- sender_email: no-reply@wallabag.org
+ enabled: %twofactor_auth%
+ sender_email: %twofactor_sender%
digits: 6
template: WallabagUserBundle:Authentication:form.html.twig
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index c1f6bc1ba..52f9bccbc 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -29,6 +29,8 @@ parameters:
# wallabag misc
app.version: 2.0.0-alpha
+ twofactor_auth: true
+ twofactor_sender: no-reply@wallabag.org
# message to display at the bottom of the page
warning_message: >
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index cee4f672c..abe5dc9ee 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -100,6 +100,7 @@
+ {% if twofactor_auth %}
+ {% endif %}
{{ form_rest(form.user) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index b20c4ea50..ab24d4eff 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -132,6 +132,7 @@
+ {% if twofactor_auth %}
{{ form_widget(form.user.twoFactorAuthentication) }}
@@ -139,6 +140,7 @@
{{ form_errors(form.user.twoFactorAuthentication) }}
+ {% endif %}
{{ form_rest(form.user) }}