Unable to find OTPCredential in chrome

Viewed 840

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?

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']}})
Related