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

View file

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