在Web应用程序中,是否有可能要求用户授权读取OTP短信,就像Android一样。
如果可能的话,请进行请求。
在Web应用程序中,是否有可能要求用户授权读取OTP短信,就像Android一样。
如果可能的话,请进行请求。
navigator.credentials.get({
otp: { transport:['sms'] },
signal: ac.signal
}).then(otp => {
input.value = otp.code;
if (form) form.submit();
}).catch(err => {
console.log(err);
});