Firebase OTP Timeout

Viewed 5308

What is the default timeout value of the OTP Code sent to the device(ie the expiration time of the OTP) in firebase Phone Authentication. If so, is there any way to change it.

1 Answers

You pass the duration right into the call to verifyPhoneNumber. From the documentation:

PhoneAuthProvider.getInstance().verifyPhoneNumber(
        phoneNumber,        // Phone number to verify
        60,                 // Timeout duration
        TimeUnit.SECONDS,   // Unit of timeout
        this,               // Activity (for callback binding)
        mCallbacks);        // OnVerificationStateChangedCallbacks
Related