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/views/themes/baggy/Config/index.html.twig | |
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/views/themes/baggy/Config/index.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | 88 |
1 files changed, 54 insertions, 34 deletions
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 %} |