Configurable Constants

|-/constants
    |-/ConfigValues
    |-/AuthorizationCodeRadioButtons
    |-/PhoneCountryCodes
    |-/Times

Resend Phone Verification Code

  1. File Times: To modify the waiting time for each attempt. At the maxTimes property you can modify the values of the minutes and seconds, for example:

    maxTimes: {    
        1: {min: 0, sec: 60},
        2: {min: 1, sec: 30},
        3: {min: 1, sec: 60},
    },
  2. File ConfigValues: To modify the number of attempts for the user to resend the code, modify the attemptsResendCode property, specifying the number of attempts (by default set to 3). Then, you must modify the file from step 1, adapting the times to the number of attempts, for example: attemptsResendCode: 4

    maxTimes: {    
        1: {min: 0, sec: 60},
        2: {min: 1, sec: 30},
        3: {min: 1, sec: 60},
        4: {min: 2, sec: 30},
    },

Then, in your file MfaVerificationCode/hooks/phoneVerification/useTime, modify the type attemptsTypes. For the example above, it should look like this:

export type attemptsTypes = 1 | 2 | 3 | 4;

AuthorizationCodeRadioButtons

Array which contains the options to send a verification code. By default it only has the option through text message.

PhoneCountryCodes

Array that contains the phone country codes supported by the application. By default the following:

{
    countryISO3166Alpha2: 'US',
    code: '+1',
    minLength: 10,
    maxLength: 10,
},

If you required to enter another country, you need to add a new object for it specifaying each field.

ConfigValues

maxPhoneCodeDigits

This const indicates the length of the verification code that is supported by the app. This is passed to the Input Code component.

Last updated