react-native-otp-verify icon indicating copy to clipboard operation
react-native-otp-verify copied to clipboard

React native 0.75.4 otp read issue on Android

Open Sathishkumargrc opened this issue 1 year ago • 4 comments

React native version 0.75.4 not working only getting hash but not getting incoming OTP

"react": "18.3.1",
"react-native": "0.75.4",

 useEffect(() => {
getHash()
  .then(hash => {
    console.log('App hash:', hash);
  })
  .catch(console.log);
  startOtpListener(m => {
    console.log('m', m)
  })
getOtp()
  .then(p => addListener(otpHandler))
  .catch(e => console.log(e));

return () => removeListener();

}, []);

const otpHandler = message => { console.log('message..', message); };

kindly have a look on android 14 may be It's not working in iOS as well. thank you!

Sathishkumargrc avatar Nov 04 '24 18:11 Sathishkumargrc

i was same issue in react-native-otp-verify [1.1.8] version

ketan-pcs avatar Nov 08 '24 05:11 ketan-pcs

Hello,

I am having the same issue, but I'm using RN 0.74.5, simply doesn't work. As mentioned, only getHash is working.

palmtown avatar Nov 15 '24 07:11 palmtown

Hello @Sathishkumargrc and @ketan-pcs

Are you including the hash in your SMS? That was my issue. You can view it here at https://github.com/faizalshap/react-native-otp-verify/issues/99#issuecomment-2479502531

I am using a lower version of RN, however, I experienced the same issue (e.g. getting hash but not opt) and it was that I was not including the hash in my SMS messages.

palmtown avatar Nov 15 '24 18:11 palmtown

react-native-otp-verify [1.1.8] version, react native 0.75.4v otp auto read and fill is not working for android 14, but its working for all below android 14 version phones..do you have any fix????

himanshu-bytive avatar Nov 26 '24 05:11 himanshu-bytive