web/flows: fix invalid validation for static tokens

closes #1663

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-31 17:31:48 +01:00
parent 335d6edd11
commit 96b0bc324e
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,8 @@ export class AuthenticatorValidateStageWebCode extends BaseStage<
<input <input
type="text" type="text"
name="code" name="code"
inputmode="numeric" inputmode="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static ? 'text' : 'numeric'}"
pattern="[0-9]*" pattern="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static ? '' : '[0-9]*'}"
placeholder="${t`Please enter your Code`}" placeholder="${t`Please enter your Code`}"
autofocus="" autofocus=""
autocomplete="one-time-code" autocomplete="one-time-code"