Phone Authentication (OTP received but when verified it always expires)

getting this exception everytime when OTP receives and tried to verify that OTP, even within 10 sec OTP expires
{ [Error: [auth/session-expired] The sms code has expired. Please re-send the verification code to try again.] line: 101, column: 244, sourceURL: ‘index.android.bundle’ }

1 possible answer(s) on “Phone Authentication (OTP received but when verified it always expires)

  1. Hey @AdilAshfaque,
    I have came across the same issue on android. React-native-firebase provides OTP auto-verification feature.So whenever you are getting OTP on the same phone which has the application it will autoverify and the OTP you get will be expired.

    Solution for that would be add an event listener in that component, catch the event and proceed further.

    https://github.com/invertase/react-native-firebase-docs/blob/master/docs/auth/phone-auth.md#3-android-handle-auto-verification

    Hope this helps..!!

Phone Authentication (OTP received but when verified it always expires)

getting this exception everytime when OTP receives and tried to verify that OTP, even within 10 sec OTP expires
{ [Error: [auth/session-expired] The sms code has expired. Please re-send the verification code to try again.] line: 101, column: 244, sourceURL: ‘index.android.bundle’ }

1 possible answer(s) on “Phone Authentication (OTP received but when verified it always expires)

  1. Hey @AdilAshfaque,
    I have came across the same issue on android. React-native-firebase provides OTP auto-verification feature.So whenever you are getting OTP on the same phone which has the application it will autoverify and the OTP you get will be expired.

    Solution for that would be add an event listener in that component, catch the event and proceed further.

    https://github.com/invertase/react-native-firebase-docs/blob/master/docs/auth/phone-auth.md#3-android-handle-auto-verification

    Hope this helps..!!