From e62779e26781c849bdc24f40e94330bec97f8069 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 5 Jan 2016 20:31:15 -0500 Subject: Improve 2FA --- app/Template/twofactor/index.php | 40 ++++++---------------------------------- app/Template/twofactor/show.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 app/Template/twofactor/show.php (limited to 'app/Template/twofactor') diff --git a/app/Template/twofactor/index.php b/app/Template/twofactor/index.php index 4c4ca088..b9ee4b49 100644 --- a/app/Template/twofactor/index.php +++ b/app/Template/twofactor/index.php @@ -2,42 +2,14 @@

-
- + form->csrf() ?> - form->checkbox('twofactor_activated', t('Enable/disable two factor authentication'), 1, isset($user['twofactor_activated']) && $user['twofactor_activated'] == 1) ?> - +

e($provider) ?>

- -
-
- - -
-

e($user['twofactor_secret']) ?> (base32)

- - -




- - -

- - e($key_url) ?> -

+ + + + - -

-
- -

-
- - form->csrf() ?> - form->label(t('Code'), 'code') ?> - form->text('code', array(), array(), array('placeholder="123456"'), 'form-numeric') ?> - -
-
- diff --git a/app/Template/twofactor/show.php b/app/Template/twofactor/show.php new file mode 100644 index 00000000..dd72965a --- /dev/null +++ b/app/Template/twofactor/show.php @@ -0,0 +1,31 @@ + + + +
+ +

e($secret) ?>

+ + + +




+ + + +

e($key_url) ?>

+ +
+ + +

+
+ + form->csrf() ?> + form->label(t('Code'), 'code') ?> + form->text('code', array(), array(), array('placeholder="123456"', 'autofocus'), 'form-numeric') ?> + +
+ +
+
\ No newline at end of file -- cgit v1.2.3