From 3ed9089e6f901b98489c28f6660cd42150b0907a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 15 Feb 2023 11:37:39 +1000 Subject: [PATCH] Switch from input[type=tel] to input[type=text][inputmode=numeric] for Authcode inputs, add a Javascript handler to enforce numeric-only inputs. --- class-two-factor-core.php | 15 ++++++++++++++- providers/class-two-factor-backup-codes.php | 2 +- providers/class-two-factor-email.php | 2 +- providers/class-two-factor-totp.php | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 8f5d9b6f..6e3f6fe7 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -782,7 +782,20 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg opacity: 0.5; } - +

- +

- +

diff --git a/providers/class-two-factor-totp.php b/providers/class-two-factor-totp.php index 55afe223..1dbc7c17 100644 --- a/providers/class-two-factor-totp.php +++ b/providers/class-two-factor-totp.php @@ -645,7 +645,7 @@ public function authentication_page( $user ) {

- +