<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: