Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find OTPCredential in chrome

I am trying to build an OTP autoread in web. I read Chrome provides OTPCredential (here). But the check 'OTPCredential' in window fails on every mobile chrome browser I am trying even when the version is greater that 84. Have they removed the support now?

like image 718
sudheer singh Avatar asked Nov 06 '22 04:11

sudheer singh


1 Answers

Check out navigator.credentials, it returns a Promise resolved with the one-time password (code) when the device receives the OTP SMS message containing the requesting URL and the code:

navigator.credentials.get({otp: {transport: ['sms']}})
like image 93
Carolyn Hodges Avatar answered Nov 12 '22 18:11

Carolyn Hodges