SMS OTP 表单最佳做法 (短信验证)
<form action="/verify-otp" method="POST">
<input type="text"
inputmode="numeric"
autocomplete="one-time-code"
pattern="\d{6}"
required>
</form>
navigator.credentials.get({
otp: {transport:['sms']}
})
.then(otp => input.value = otp.code);
See also: