You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With all this configuration done, I wrote this code!
const handlePhoneSubmit = async (values: { phoneNumber: string, otpStatus: boolean }) => {
setLoading(true);
try {
// YES, I am using the Firebase SDK until I found out that there was no way to
// the signInWithPhoneNumber using the FirebaseSDK directly in react-native
await setDoc(doc(_firestoreService, "userDetails", currentUser.uid), {
phoneNumber: values.phoneNumber,
isOtpLogginEnabled: values.otpStatus,
isPhoneVerified: false,
});
const confirmation = await auth().signInWithPhoneNumber(values.phoneNumber);
setConfirmation(confirmation);
successToast("", SignUpMessages.OTP_CODE_SENT)
navigation.navigate(ComponentNames.OTP);
} catch (err) {
errorToast(SignUpMessages.OTP_CODE_NOT_SENT)
console.log(JSON.stringify(err, null, 2));
} finally {
setLoading(false);
}
}
But even with all these, which I think I did right, I am not able to send an OTP code to my test phone number!
Note
I am using the command npx expo run:android to test the application
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So I am following the official documentation to set up my expo application with the package (https://rnfirebase.io/). I am also following the documentation from the Phone Auth page (https://rnfirebase.io/auth/phone-auth).
I have already done the below things:
(for android I generated the SHA-1 key with npx eas credentials)
app.json
file with these configurations:react-native-firabase
in the plugins array of theapp.json
fileWith all this configuration done, I wrote this code!
But even with all these, which I think I did right, I am not able to send an OTP code to my test phone number!
Note
I am using the command
npx expo run:android
to test the applicationBeta Was this translation helpful? Give feedback.
All reactions