Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to implement OTP with Web OTP API

Web OTP API information provided by https://web.dev/web-otp is good. But demo provided in https://web-otp.glitch.me/ is working as of now with Version 86.0.4240.111 (Official Build) (64-bit).

The main reason I could see is that navigation credentials event for OTP is not getting triggered, and I don't understand why this is happening.

Is it problem with codebase of https://web-otp.glitch.me/ OR chrome mentioned version has any problem?

Steps to reproduce -

  1. Open https://web-otp.glitch.me/ at your mobile browser.
  2. As webpage says, get @web-otp.glitch.me #12345 as text message to your mobile, from unknown number . And you should receive a dialog message, asking you whether you want your browser to input this OTP.
like image 267
Vaibhav Arora Avatar asked Oct 15 '25 05:10

Vaibhav Arora


1 Answers

Try changing the host name, incorrect host name may stop the Promise from getting resolved, i.e., navigator.credentials.get

Make sure your last line of text message should be like this:

@<HOSTNAME_OF_WEBSITE> #<OTP>

like image 196
Tanay Toshniwal Avatar answered Oct 16 '25 20:10

Tanay Toshniwal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!