Replies: 1 comment
-
Is this an issue, or a discussion? Seems too specific for discussion but there is not the template information needed from the issue template to say anything. And the formatting is awful, I can't read it - try using triple-backticks and a language specifier? // comment
console.log("I am pretty javascript code people can read to help!"); Also there are lots of other issues, have you examined them? https://github.com/invertase/react-native-firebase/issues?q=is%3Aissue+OTP+sort%3Aupdated-desc Finally, I do not think this actually has anything to do with react-native-firebase, I think this will have to do with firebase-android-sdk (have you checked their repo? their docs?) or you may post it on stackoverflow where firebase team provides support for general questions |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to add phone authentication using firebase-auth with auto retriever SMS functionality. my app is already published on play store.
i installed @react-native-firebase/auth package and setup correctly as per this documentation.
after this, i wrote code for phone authentication like this,
setConfirmResult = (result) => (confirmResult = result);
signIn(phoneNumber) {
return new Promise((resolve, reject) => {
auth()
.signInWithPhoneNumber(phoneNumber)
.then((confirmResult) => {
this.setConfirmResult(confirmResult);
resolve(confirmResult);
})
.catch((error) => reject(error));
});
}
verifyOtp(otp) {
return new Promise((resolve, reject) => {
if (confirmResult != null && otp.length) {
confirmResult
.confirm(otp)
.then((user) => {
resolve(user);
})
.catch((error) => reject(error));
} else {
reject({code: "didn't sent yet"});
}
});
}
when i call signIn function, firebase send OTP SMS like %LOGIN_CODE% is your verification code for %APP_NAME%.
but as i said i want to detect OTP for auto retriever and filled it in my textinput and for this, i need this type of SMS format but right now i can not get 11 digit hash code in SMS from firebase.
when i create demo app and integrate phone authentication then it will work fine, firebase send 11 digit hash code in OTP SMS but in my new version of project SMS is not contain hash code because of previous version of this project is already lived on playstore.
please help me how i can get hash code for app identity in OTP SMS which is come from firebase?
Beta Was this translation helpful? Give feedback.
All reactions