From fc3d67c079e5d48b0b4cf4d0b2c1340bf3bf26b7 Mon Sep 17 00:00:00 2001 From: romanetar Date: Tue, 25 Nov 2025 16:54:00 +0100 Subject: [PATCH] feat: make otp numeric only Signed-off-by: romanetar --- app/Models/OAuth2/OAuth2OTP.php | 2 +- resources/js/login/login.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/OAuth2/OAuth2OTP.php b/app/Models/OAuth2/OAuth2OTP.php index 37356cd6..db46b89a 100644 --- a/app/Models/OAuth2/OAuth2OTP.php +++ b/app/Models/OAuth2/OAuth2OTP.php @@ -412,7 +412,7 @@ public function getType(): string return "otp"; } - const VsChar = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + const VsChar = "0123456789"; public function generateValue(): string { diff --git a/resources/js/login/login.js b/resources/js/login/login.js index 9211ff19..c55a4b91 100644 --- a/resources/js/login/login.js +++ b/resources/js/login/login.js @@ -226,6 +226,7 @@ const OTPInputForm = ({ value={otpCode} onChange={onCodeChange} numInputs={otpLength} + inputType="tel" renderInput={(props) => } shouldAutoFocus={true} hasErrored={!otpError}