diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-12-02 12:43:05 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-01-23 13:28:02 +0100 |
commit | a6b242a1fd6f8900d80354361449f1bf62506ef9 (patch) | |
tree | f69d87208d0ebbdb8517529582280b174af74a16 /src/Wallabag/CoreBundle/Resources | |
parent | acd4412080dfb73ecaa7f9983728d1d55bc27ea4 (diff) | |
download | wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.tar.gz wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.tar.zst wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.zip |
Enable OTP 2FA
- Update SchebTwoFactorBundle to version 3
- Enable Google 2fa on the bundle
- Disallow ability to use both email and google as 2fa
- Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7)
- use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add`
- update admin to be able to create/reset the 2fa
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
16 files changed, 154 insertions, 104 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 96679a9c..e62ba6d0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | # rss_limit: 'Number of items in the feed' | 100 | # rss_limit: 'Number of items in the feed' |
101 | form_user: | 101 | form_user: |
102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Navn' | 103 | name_label: 'Navn' |
104 | email_label: 'Emailadresse' | 104 | email_label: 'Emailadresse' |
105 | # twoFactorAuthentication_label: 'Two factor authentication' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | # title: Delete my account (a.k.a danger zone) | 108 | # title: Delete my account (a.k.a danger zone) |
109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'Emailadresse' | 533 | email_label: 'Emailadresse' |
534 | # enabled_label: 'Enabled' | 534 | # enabled_label: 'Enabled' |
535 | # last_login_label: 'Last login' | 535 | # last_login_label: 'Last login' |
536 | # twofactor_label: Two factor authentication | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | # save: Save | 538 | # save: Save |
538 | # delete: Delete | 539 | # delete: Delete |
539 | # delete_confirm: Are you sure? | 540 | # delete_confirm: Are you sure? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index c56e87b5..f2d0408f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: 'Alle' | 99 | all: 'Alle' |
100 | rss_limit: 'Anzahl der Einträge pro Feed' | 100 | rss_limit: 'Anzahl der Einträge pro Feed' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Wenn du die Zwei-Faktor-Authentifizierung aktivierst, erhältst du eine E-Mail mit einem Code bei jeder nicht vertrauenswürdigen Verbindung" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Name' | 103 | name_label: 'Name' |
104 | email_label: 'E-Mail-Adresse' | 104 | email_label: 'E-Mail-Adresse' |
105 | twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "Wenn du 2FA aktivierst, wirst du bei jedem Login einen Code per E-Mail bekommen." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: 'Lösche mein Konto (a.k.a Gefahrenzone)' | 108 | title: 'Lösche mein Konto (a.k.a Gefahrenzone)' |
109 | description: 'Wenn du dein Konto löschst, werden ALL deine Artikel, ALL deine Tags, ALL deine Anmerkungen und dein Konto dauerhaft gelöscht (kann NICHT RÜCKGÄNGIG gemacht werden). Du wirst anschließend ausgeloggt.' | 109 | description: 'Wenn du dein Konto löschst, werden ALL deine Artikel, ALL deine Tags, ALL deine Anmerkungen und dein Konto dauerhaft gelöscht (kann NICHT RÜCKGÄNGIG gemacht werden). Du wirst anschließend ausgeloggt.' |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'E-Mail-Adresse' | 533 | email_label: 'E-Mail-Adresse' |
534 | enabled_label: 'Aktiviert' | 534 | enabled_label: 'Aktiviert' |
535 | last_login_label: 'Letzter Login' | 535 | last_login_label: 'Letzter Login' |
536 | twofactor_label: 'Zwei-Faktor-Authentifizierung' | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: 'Speichern' | 538 | save: 'Speichern' |
538 | delete: 'Löschen' | 539 | delete: 'Löschen' |
539 | delete_confirm: 'Bist du sicher?' | 540 | delete_confirm: 'Bist du sicher?' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index d57cea0f..859acdc0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: 'All' | 99 | all: 'All' |
100 | rss_limit: 'Number of items in the feed' | 100 | rss_limit: 'Number of items in the feed' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connection." | 102 | two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Name' | 103 | name_label: 'Name' |
104 | email_label: 'Email' | 104 | email_label: 'Email' |
105 | twoFactorAuthentication_label: 'Two factor authentication' | 105 | emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: Delete my account (a.k.a danger zone) | 108 | title: Delete my account (a.k.a danger zone) |
109 | description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'Email' | 533 | email_label: 'Email' |
534 | enabled_label: 'Enabled' | 534 | enabled_label: 'Enabled' |
535 | last_login_label: 'Last login' | 535 | last_login_label: 'Last login' |
536 | twofactor_label: Two factor authentication | 536 | twofactor_email_label: Two factor authentication by email |
537 | twofactor_google_label: Two factor authentication by Google | ||
537 | save: Save | 538 | save: Save |
538 | delete: Delete | 539 | delete: Delete |
539 | delete_confirm: Are you sure? | 540 | delete_confirm: Are you sure? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index e1c4e221..3c3cbed4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'Límite de artículos en feed RSS' | 100 | rss_limit: 'Límite de artículos en feed RSS' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Con la autenticación en dos pasos recibirá código por e-mail en cada nueva conexión que no sea de confianza." | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nombre' | 103 | name_label: 'Nombre' |
104 | email_label: 'Dirección de e-mail' | 104 | email_label: 'Dirección de e-mail' |
105 | twoFactorAuthentication_label: 'Autenticación en dos pasos' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "Si activas la autenticación en dos pasos, cada vez que quieras iniciar sesión en wallabag recibirás un código por e-mail." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: Eliminar mi cuenta (Zona peligrosa) | 108 | title: Eliminar mi cuenta (Zona peligrosa) |
109 | description: Si eliminas tu cuenta, TODOS tus artículos, TODAS tus etiquetas, TODAS tus anotaciones y tu cuenta serán eliminadas de forma PERMANENTE (no se puede deshacer). Después serás desconectado. | 109 | description: Si eliminas tu cuenta, TODOS tus artículos, TODAS tus etiquetas, TODAS tus anotaciones y tu cuenta serán eliminadas de forma PERMANENTE (no se puede deshacer). Después serás desconectado. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'E-mail' | 533 | email_label: 'E-mail' |
534 | enabled_label: 'Activado' | 534 | enabled_label: 'Activado' |
535 | last_login_label: 'Último inicio de sesión' | 535 | last_login_label: 'Último inicio de sesión' |
536 | twofactor_label: Autenticación en dos pasos | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: Guardar | 538 | save: Guardar |
538 | delete: Eliminar | 539 | delete: Eliminar |
539 | delete_confirm: ¿Estás seguro? | 540 | delete_confirm: ¿Estás seguro? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 2ede433e..ca25b390 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'محدودیت آر-اس-اس' | 100 | rss_limit: 'محدودیت آر-اس-اس' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "با فعالکردن تأیید ۲مرحلهای هر بار که اتصال تأییدنشدهای برقرار شد، به شما یک کد از راه ایمیل فرستاده میشود" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'نام' | 103 | name_label: 'نام' |
104 | email_label: 'نشانی ایمیل' | 104 | email_label: 'نشانی ایمیل' |
105 | twoFactorAuthentication_label: 'تأیید ۲مرحلهای' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | # title: Delete my account (a.k.a danger zone) | 108 | # title: Delete my account (a.k.a danger zone) |
109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'نشانی ایمیل' | 533 | email_label: 'نشانی ایمیل' |
534 | # enabled_label: 'Enabled' | 534 | # enabled_label: 'Enabled' |
535 | # last_login_label: 'Last login' | 535 | # last_login_label: 'Last login' |
536 | # twofactor_label: Two factor authentication | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | # save: Save | 538 | # save: Save |
538 | # delete: Delete | 539 | # delete: Delete |
539 | # delete_confirm: Are you sure? | 540 | # delete_confirm: Are you sure? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index d69ae280..b809ca32 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: "Tous" | 99 | all: "Tous" |
100 | rss_limit: "Nombre d’articles dans le flux" | 100 | rss_limit: "Nombre d’articles dans le flux" |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Activer l’authentification double-facteur veut dire que vous allez recevoir un code par courriel à chaque nouvelle connexion non approuvée." | 102 | two_factor_description: "Activer l’authentification double-facteur veut dire que vous allez recevoir un code par courriel OU que vous devriez utiliser une application de mot de passe à usage unique (comme Google Authenticator) pour obtenir un code temporaire à chaque nouvelle connexion non approuvée. Vous ne pouvez pas choisir les deux options." |
103 | name_label: "Nom" | 103 | name_label: "Nom" |
104 | email_label: "Adresse courriel" | 104 | email_label: "Adresse courriel" |
105 | twoFactorAuthentication_label: "Double authentification" | 105 | emailTwoFactor_label: 'En utlisant l’email (recevez un code par email)' |
106 | help_twoFactorAuthentication: "Si vous activez 2FA, à chaque tentative de connexion à wallabag, vous recevrez un code par email." | 106 | googleTwoFactor_label: 'En utilisant une application de mot de passe à usage unique (ouvrez l’app, comme Google Authenticator, pour obtenir un mot de passe à usage unique)' |
107 | delete: | 107 | delete: |
108 | title: "Supprimer mon compte (attention danger !)" | 108 | title: "Supprimer mon compte (attention danger !)" |
109 | description: "Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c’est IRRÉVERSIBLE). Vous serez ensuite déconnecté." | 109 | description: "Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c’est IRRÉVERSIBLE). Vous serez ensuite déconnecté." |
@@ -534,6 +534,8 @@ user: | |||
534 | enabled_label: "Activé" | 534 | enabled_label: "Activé" |
535 | last_login_label: "Dernière connexion" | 535 | last_login_label: "Dernière connexion" |
536 | twofactor_label: "Double authentification" | 536 | twofactor_label: "Double authentification" |
537 | twofactor_email_label: Double authentification par email | ||
538 | twofactor_google_label: Double authentification par Google | ||
537 | save: "Sauvegarder" | 539 | save: "Sauvegarder" |
538 | delete: "Supprimer" | 540 | delete: "Supprimer" |
539 | delete_confirm: "Êtes-vous sûr ?" | 541 | delete_confirm: "Êtes-vous sûr ?" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index f16ffb6b..7279dba1 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'Numero di elementi nel feed' | 100 | rss_limit: 'Numero di elementi nel feed' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Abilitando l'autenticazione a due fattori riceverai una e-mail con un codice per ogni nuova connesione non verificata" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nome' | 103 | name_label: 'Nome' |
104 | email_label: 'E-mail' | 104 | email_label: 'E-mail' |
105 | twoFactorAuthentication_label: 'Autenticazione a due fattori' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "Se abiliti l'autenticazione a due fattori, ogni volta che vorrai connetterti a wallabag, riceverai un codice via E-mail." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: Cancella il mio account (zona pericolosa) | 108 | title: Cancella il mio account (zona pericolosa) |
109 | description: Rimuovendo il tuo account, TUTTI i tuoi articoli, TUTTE le tue etichette, TUTTE le tue annotazioni ed il tuo account verranno rimossi PERMANENTEMENTE (impossibile da ANNULLARE). Verrai poi disconnesso. | 109 | description: Rimuovendo il tuo account, TUTTI i tuoi articoli, TUTTE le tue etichette, TUTTE le tue annotazioni ed il tuo account verranno rimossi PERMANENTEMENTE (impossibile da ANNULLARE). Verrai poi disconnesso. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'E-mail' | 533 | email_label: 'E-mail' |
534 | enabled_label: 'Abilitato' | 534 | enabled_label: 'Abilitato' |
535 | last_login_label: 'Ultima connessione' | 535 | last_login_label: 'Ultima connessione' |
536 | twofactor_label: Autenticazione a due fattori | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: Salva | 538 | save: Salva |
538 | delete: Cancella | 539 | delete: Cancella |
539 | delete_confirm: Sei sicuro? | 540 | delete_confirm: Sei sicuro? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index b568fbc5..f262ba7b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: 'Totes' | 99 | all: 'Totes' |
100 | rss_limit: "Nombre d'articles dins un flux RSS" | 100 | rss_limit: "Nombre d'articles dins un flux RSS" |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Activar l'autentificacion en dos temps vòl dire que recebretz un còdi per corrièl per cada novèla connexion pas aprovada." | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nom' | 103 | name_label: 'Nom' |
104 | email_label: 'Adreça de corrièl' | 104 | email_label: 'Adreça de corrièl' |
105 | twoFactorAuthentication_label: 'Dobla autentificacion' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "S'avètz activat l'autentificacion en dos temps, cada còp que volètz vos connectar a wallabag, recebretz un còdi per corrièl." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: Suprimir mon compte (Mèfi zòna perilhosa) | 108 | title: Suprimir mon compte (Mèfi zòna perilhosa) |
109 | description: Se confirmatz la supression de vòstre compte, TOTES vòstres articles, TOTAS vòstras etiquetas, TOTAS vòstras anotacions e vòstre compte seràn suprimits per totjorn. E aquò es IRREVERSIBLE. Puèi seretz desconnectat. | 109 | description: Se confirmatz la supression de vòstre compte, TOTES vòstres articles, TOTAS vòstras etiquetas, TOTAS vòstras anotacions e vòstre compte seràn suprimits per totjorn. E aquò es IRREVERSIBLE. Puèi seretz desconnectat. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'Adreça de corrièl' | 533 | email_label: 'Adreça de corrièl' |
534 | enabled_label: 'Actiu' | 534 | enabled_label: 'Actiu' |
535 | last_login_label: 'Darrièra connexion' | 535 | last_login_label: 'Darrièra connexion' |
536 | twofactor_label: 'Autentificacion doble-factor' | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: 'Enregistrar' | 538 | save: 'Enregistrar' |
538 | delete: 'Suprimir' | 539 | delete: 'Suprimir' |
539 | delete_confirm: 'Sètz segur ?' | 540 | delete_confirm: 'Sètz segur ?' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index b58e14f4..99c2183e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: 'Wszystkie' | 99 | all: 'Wszystkie' |
100 | rss_limit: 'Link do RSS' | 100 | rss_limit: 'Link do RSS' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "Włączenie autoryzacji dwuetapowej oznacza, że będziesz otrzymywał maile z kodem przy każdym nowym, niezaufanym połączeniu" | 102 | two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nazwa' | 103 | name_label: 'Nazwa' |
104 | email_label: 'Adres email' | 104 | email_label: 'Adres email' |
105 | twoFactorAuthentication_label: 'Autoryzacja dwuetapowa' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "Jeżeli włączysz autoryzację dwuetapową. Za każdym razem, kiedy będziesz chciał się zalogować, dostaniesz kod na swój e-mail." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: Usuń moje konto (niebezpieczna strefa !) | 108 | title: Usuń moje konto (niebezpieczna strefa !) |
109 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. | 109 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'Adres email' | 533 | email_label: 'Adres email' |
534 | enabled_label: 'Włączony' | 534 | enabled_label: 'Włączony' |
535 | last_login_label: 'Ostatnie logowanie' | 535 | last_login_label: 'Ostatnie logowanie' |
536 | twofactor_label: Autoryzacja dwuetapowa | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: Zapisz | 538 | save: Zapisz |
538 | delete: Usuń | 539 | delete: Usuń |
539 | delete_confirm: Jesteś pewien? | 540 | delete_confirm: Jesteś pewien? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index add28bf7..806c2d78 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'Número de itens no feed' | 100 | rss_limit: 'Número de itens no feed' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: 'Habilitar autenticação de dois passos significa que você receberá um e-mail com um código a cada nova conexão desconhecida.' | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nome' | 103 | name_label: 'Nome' |
104 | email_label: 'E-mail' | 104 | email_label: 'E-mail' |
105 | twoFactorAuthentication_label: 'Autenticação de dois passos' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | # title: Delete my account (a.k.a danger zone) | 108 | # title: Delete my account (a.k.a danger zone) |
109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'E-mail' | 533 | email_label: 'E-mail' |
534 | enabled_label: 'Habilitado' | 534 | enabled_label: 'Habilitado' |
535 | last_login_label: 'Último login' | 535 | last_login_label: 'Último login' |
536 | twofactor_label: 'Autenticação de dois passos' | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | save: 'Salvar' | 538 | save: 'Salvar' |
538 | delete: 'Apagar' | 539 | delete: 'Apagar' |
539 | delete_confirm: 'Tem certeza?' | 540 | delete_confirm: 'Tem certeza?' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 6a38c4a1..ed75ed6e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'Limită RSS' | 100 | rss_limit: 'Limită RSS' |
101 | form_user: | 101 | form_user: |
102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'Nume' | 103 | name_label: 'Nume' |
104 | email_label: 'E-mail' | 104 | email_label: 'E-mail' |
105 | # twoFactorAuthentication_label: 'Two factor authentication' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | # title: Delete my account (a.k.a danger zone) | 108 | # title: Delete my account (a.k.a danger zone) |
109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -533,7 +533,8 @@ user: | |||
533 | email_label: 'E-mail' | 533 | email_label: 'E-mail' |
534 | # enabled_label: 'Enabled' | 534 | # enabled_label: 'Enabled' |
535 | # last_login_label: 'Last login' | 535 | # last_login_label: 'Last login' |
536 | # twofactor_label: Two factor authentication | 536 | # twofactor_email_label: Two factor authentication by email |
537 | # twofactor_google_label: Two factor authentication by Google | ||
537 | # save: Save | 538 | # save: Save |
538 | # delete: Delete | 539 | # delete: Delete |
539 | # delete_confirm: Are you sure? | 540 | # delete_confirm: Are you sure? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index 1b7ac38a..1c6e6771 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml | |||
@@ -96,11 +96,11 @@ config: | |||
96 | archive: 'архивные' | 96 | archive: 'архивные' |
97 | rss_limit: 'Количество записей в фиде' | 97 | rss_limit: 'Количество записей в фиде' |
98 | form_user: | 98 | form_user: |
99 | two_factor_description: "Включить двухфакторную аутентификацию, Вы получите сообщение на указанный email с кодом, при каждом новом непроверенном подключении." | 99 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
100 | name_label: 'Имя' | 100 | name_label: 'Имя' |
101 | email_label: 'Email' | 101 | email_label: 'Email' |
102 | twoFactorAuthentication_label: 'Двухфакторная аутентификация' | 102 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
103 | help_twoFactorAuthentication: "Если Вы включите двухфакторную аутентификацию, то Вы будете получать код на указанный ранее email, каждый раз при входе в wallabag." | 103 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
104 | delete: | 104 | delete: |
105 | title: "Удалить мой аккаунт (или опасная зона)" | 105 | title: "Удалить мой аккаунт (или опасная зона)" |
106 | description: "Если Вы удалите ваш аккаунт, ВСЕ ваши записи, теги и другие данные, будут БЕЗВОЗВРАТНО удалены (операция не может быть отменена после). Затем Вы выйдете из системы." | 106 | description: "Если Вы удалите ваш аккаунт, ВСЕ ваши записи, теги и другие данные, будут БЕЗВОЗВРАТНО удалены (операция не может быть отменена после). Затем Вы выйдете из системы." |
@@ -521,7 +521,8 @@ user: | |||
521 | email_label: 'Email' | 521 | email_label: 'Email' |
522 | enabled_label: 'Включить' | 522 | enabled_label: 'Включить' |
523 | last_login_label: 'Последний вход' | 523 | last_login_label: 'Последний вход' |
524 | twofactor_label: "Двухфакторная аутентификация" | 524 | # twofactor_email_label: Two factor authentication by email |
525 | # twofactor_google_label: Two factor authentication by Google | ||
525 | save: "Сохранить" | 526 | save: "Сохранить" |
526 | delete: "Удалить" | 527 | delete: "Удалить" |
527 | delete_confirm: "Вы уверены?" | 528 | delete_confirm: "Вы уверены?" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index fe1b35be..af798943 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | all: 'ทั้งหมด' | 99 | all: 'ทั้งหมด' |
100 | rss_limit: 'จำนวนไอเทมที่เก็บ' | 100 | rss_limit: 'จำนวนไอเทมที่เก็บ' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "การเปิดใช้งาน two factor authentication คือคุณจะต้องได้รับอีเมลกับ code ที่ยังไม่ตรวจสอบในการเชื่อมต่อ" | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'ชื่อ' | 103 | name_label: 'ชื่อ' |
104 | email_label: 'อีเมล' | 104 | email_label: 'อีเมล' |
105 | twoFactorAuthentication_label: 'Two factor authentication' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | help_twoFactorAuthentication: "ถ้าคุณเปิด 2FA, ในแต่ละช่วงเวลาที่คุณต้องการลงชื่อเข้าใช wallabag, คุณจะต้องได้รับ code จากอีเมล" | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | title: ลบบัญชีของฉัน (โซนที่เป็นภัย!) | 108 | title: ลบบัญชีของฉัน (โซนที่เป็นภัย!) |
109 | description: ถ้าคุณลบบัญชีของคุณIf , รายการทั้งหมดของคุณ, แท็กทั้งหมดของคุณ, หมายเหตุทั้งหมดของคุณและบัญชีของคุณจะถูกลบอย่างถาวร (มันไม่สามารถยกเลิกได้) คุณจะต้องลงชื่อออก | 109 | description: ถ้าคุณลบบัญชีของคุณIf , รายการทั้งหมดของคุณ, แท็กทั้งหมดของคุณ, หมายเหตุทั้งหมดของคุณและบัญชีของคุณจะถูกลบอย่างถาวร (มันไม่สามารถยกเลิกได้) คุณจะต้องลงชื่อออก |
@@ -531,7 +531,8 @@ user: | |||
531 | email_label: 'อีเมล' | 531 | email_label: 'อีเมล' |
532 | enabled_label: 'เปิดใช้งาน' | 532 | enabled_label: 'เปิดใช้งาน' |
533 | last_login_label: 'ลงชื้อเข้าใช้ครั้งสุดท้าย' | 533 | last_login_label: 'ลงชื้อเข้าใช้ครั้งสุดท้าย' |
534 | twofactor_label: Two factor authentication | 534 | # twofactor_email_label: Two factor authentication by email |
535 | # twofactor_google_label: Two factor authentication by Google | ||
535 | save: บันทึก | 536 | save: บันทึก |
536 | delete: ลบ | 537 | delete: ลบ |
537 | delete_confirm: ตุณแน่ใจหรือไม่? | 538 | delete_confirm: ตุณแน่ใจหรือไม่? |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 638714e4..352a2cc4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -99,11 +99,11 @@ config: | |||
99 | # all: 'All' | 99 | # all: 'All' |
100 | rss_limit: 'RSS içeriğinden talep edilecek makale limiti' | 100 | rss_limit: 'RSS içeriğinden talep edilecek makale limiti' |
101 | form_user: | 101 | form_user: |
102 | two_factor_description: "İki adımlı doğrulamayı aktifleştirdiğinizde, her yeni güvenilmeyen bağlantılarda size e-posta ile bir kod alacaksınız." | 102 | # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator) to get a one time code on every new untrusted connection. You can't choose both option." |
103 | name_label: 'İsim' | 103 | name_label: 'İsim' |
104 | email_label: 'E-posta' | 104 | email_label: 'E-posta' |
105 | twoFactorAuthentication_label: 'İki adımlı doğrulama' | 105 | # emailTwoFactor_label: 'Using email (receive a code by email)' |
106 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 106 | # googleTwoFactor_label: 'Using an OTP app (open the app, like Google Authenticator, to get a one time code)' |
107 | delete: | 107 | delete: |
108 | # title: Delete my account (a.k.a danger zone) | 108 | # title: Delete my account (a.k.a danger zone) |
109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 109 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
@@ -531,7 +531,8 @@ user: | |||
531 | email_label: 'E-posta' | 531 | email_label: 'E-posta' |
532 | # enabled_label: 'Enabled' | 532 | # enabled_label: 'Enabled' |
533 | # last_login_label: 'Last login' | 533 | # last_login_label: 'Last login' |
534 | # twofactor_label: Two factor authentication | 534 | # twofactor_email_label: Two factor authentication by email |
535 | # twofactor_google_label: Two factor authentication by Google | ||
535 | # save: Save | 536 | # save: Save |
536 | # delete: Delete | 537 | # delete: Delete |
537 | # delete_confirm: Are you sure? | 538 | # delete_confirm: Are you sure? |
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 bcc57dac..5c4e44dd 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 | |||
@@ -176,43 +176,36 @@ | |||
176 | 176 | ||
177 | <fieldset class="w500p inline"> | 177 | <fieldset class="w500p inline"> |
178 | <div class="row"> | 178 | <div class="row"> |
179 | {{ form_label(form.user.twoFactorAuthentication) }} | 179 | {{ form_label(form.user.emailTwoFactor) }} |
180 | {{ form_errors(form.user.twoFactorAuthentication) }} | 180 | {{ form_errors(form.user.emailTwoFactor) }} |
181 | {{ form_widget(form.user.twoFactorAuthentication) }} | 181 | {{ form_widget(form.user.emailTwoFactor) }} |
182 | </div> | 182 | </div> |
183 | <a href="#" title="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> | 183 | <br/> |
184 | <i class="material-icons">live_help</i> | 184 | <div class="row"> |
185 | </a> | 185 | {{ form_label(form.user.googleTwoFactor) }} |
186 | {{ form_widget(form.user.googleTwoFactor) }} | ||
187 | {{ form_errors(form.user.googleTwoFactor) }} | ||
188 | </div> | ||
189 | {% for OTPSecret in app.session.flashbag.get('OTPSecret') %} | ||
190 | <div class="row"> | ||
191 | You just enabled the OTP two factor authentication, open your OTP app and use that code to get a one time password. | ||
192 | <br/> | ||
193 | That code will disapear after a page reload. | ||
194 | <br/><br/> | ||
195 | <strong>{{ OTPSecret.code }}</strong> | ||
196 | <br/><br/> | ||
197 | Or you can scan that QR Code with your app: | ||
198 | <br/> | ||
199 | <img id="2faQrcode" class="hide-on-med-and-down" /> | ||
200 | |||
201 | <script> | ||
202 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ OTPSecret.qrCode }}');; | ||
203 | </script> | ||
204 | </div> | ||
205 | {% endfor %} | ||
186 | </fieldset> | 206 | </fieldset> |
187 | {% endif %} | 207 | {% endif %} |
188 | 208 | ||
189 | <h2>{{ 'config.reset.title'|trans }}</h2> | ||
190 | <fieldset class="w500p inline"> | ||
191 | <p>{{ 'config.reset.description'|trans }}</p> | ||
192 | <ul> | ||
193 | <li> | ||
194 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
195 | {{ 'config.reset.annotations'|trans }} | ||
196 | </a> | ||
197 | </li> | ||
198 | <li> | ||
199 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
200 | {{ 'config.reset.tags'|trans }} | ||
201 | </a> | ||
202 | </li> | ||
203 | <li> | ||
204 | <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
205 | {{ 'config.reset.archived'|trans }} | ||
206 | </a> | ||
207 | </li> | ||
208 | <li> | ||
209 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
210 | {{ 'config.reset.entries'|trans }} | ||
211 | </a> | ||
212 | </li> | ||
213 | </ul> | ||
214 | </fieldset> | ||
215 | |||
216 | {{ form_widget(form.user._token) }} | 209 | {{ form_widget(form.user._token) }} |
217 | {{ form_widget(form.user.save) }} | 210 | {{ form_widget(form.user.save) }} |
218 | </form> | 211 | </form> |
@@ -277,7 +270,7 @@ | |||
277 | {% endfor %} | 270 | {% endfor %} |
278 | </ul> | 271 | </ul> |
279 | 272 | ||
280 | {{ form_start(form.new_tagging_rule) }} | 273 | {{ form_start(form.new_tagging_rule) }} |
281 | {{ form_errors(form.new_tagging_rule) }} | 274 | {{ form_errors(form.new_tagging_rule) }} |
282 | 275 | ||
283 | <fieldset class="w500p inline"> | 276 | <fieldset class="w500p inline"> |
@@ -382,4 +375,31 @@ | |||
382 | </table> | 375 | </table> |
383 | </div> | 376 | </div> |
384 | </div> | 377 | </div> |
378 | |||
379 | <h2>{{ 'config.reset.title'|trans }}</h2> | ||
380 | <fieldset class="w500p inline"> | ||
381 | <p>{{ 'config.reset.description'|trans }}</p> | ||
382 | <ul> | ||
383 | <li> | ||
384 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
385 | {{ 'config.reset.annotations'|trans }} | ||
386 | </a> | ||
387 | </li> | ||
388 | <li> | ||
389 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
390 | {{ 'config.reset.tags'|trans }} | ||
391 | </a> | ||
392 | </li> | ||
393 | <li> | ||
394 | <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
395 | {{ 'config.reset.archived'|trans }} | ||
396 | </a> | ||
397 | </li> | ||
398 | <li> | ||
399 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
400 | {{ 'config.reset.entries'|trans }} | ||
401 | </a> | ||
402 | </li> | ||
403 | </ul> | ||
404 | </fieldset> | ||
385 | {% endblock %} | 405 | {% endblock %} |
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 35800989..887d154f 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 | |||
@@ -112,8 +112,7 @@ | |||
112 | <img id="androidQrcode" class="hide-on-med-and-down" /> | 112 | <img id="androidQrcode" class="hide-on-med-and-down" /> |
113 | </div> | 113 | </div> |
114 | <script> | 114 | <script> |
115 | const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); | 115 | document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');; |
116 | document.getElementById('androidQrcode').src = imgBase64; | ||
117 | </script> | 116 | </script> |
118 | </div> | 117 | </div> |
119 | 118 | ||
@@ -198,22 +197,38 @@ | |||
198 | </div> | 197 | </div> |
199 | 198 | ||
200 | {% if twofactor_auth %} | 199 | {% if twofactor_auth %} |
201 | <div class="row"> | 200 | <div class="row"> |
202 | <div class="input-field col s11"> | ||
203 | {{ 'config.form_user.two_factor_description'|trans }} | 201 | {{ 'config.form_user.two_factor_description'|trans }} |
204 | 202 | ||
205 | <br /> | 203 | <div class="input-field col s11"> |
206 | 204 | {{ form_widget(form.user.emailTwoFactor) }} | |
207 | {{ form_widget(form.user.twoFactorAuthentication) }} | 205 | {{ form_label(form.user.emailTwoFactor) }} |
208 | {{ form_label(form.user.twoFactorAuthentication) }} | 206 | {{ form_errors(form.user.emailTwoFactor) }} |
209 | {{ form_errors(form.user.twoFactorAuthentication) }} | 207 | </div> |
210 | </div> | 208 | <div class="input-field col s11"> |
211 | <div class="input-field col s1"> | 209 | {{ form_widget(form.user.googleTwoFactor) }} |
212 | <a href="#" class="tooltipped" data-position="left" data-delay="50" data-tooltip="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> | 210 | {{ form_label(form.user.googleTwoFactor) }} |
213 | <i class="material-icons">live_help</i> | 211 | {{ form_errors(form.user.googleTwoFactor) }} |
214 | </a> | 212 | </div> |
215 | </div> | 213 | </div> |
216 | </div> | 214 | |
215 | {% for OTPSecret in app.session.flashbag.get('OTPSecret') %} | ||
216 | <div class="card-panel yellow darken-1 black-text"> | ||
217 | You just enabled the OTP two factor authentication, open your OTP app and use that code to get a one time password. | ||
218 | <br/> | ||
219 | That code will disapear after a page reload. | ||
220 | <br/><br/> | ||
221 | <strong>{{ OTPSecret.code }}</strong> | ||
222 | <br/><br/> | ||
223 | Or you can scan that QR Code with your app: | ||
224 | <br/> | ||
225 | <img id="2faQrcode" class="hide-on-med-and-down" /> | ||
226 | |||
227 | <script> | ||
228 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ OTPSecret.qrCode }}');; | ||
229 | </script> | ||
230 | </div> | ||
231 | {% endfor %} | ||
217 | {% endif %} | 232 | {% endif %} |
218 | 233 | ||
219 | {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | 234 | {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |