Forgot Password
Overview
The Forgot Password feature gives users the ability to recover their password when they have forgotten it. The way this is achieved is by presenting the user a form to enter their registered phone or email address, and date of birth to confirm their identity. Once the user has entered their details, a confirmation page is displayed to the user prompting them to check their email or text messages for the recovery procedure.
Branding
The password recovery feature is visually identical between brands but for the different themes. In functionality, there are 2 differences:
Phone validation:
The reason behind this difference is the geographical reach of each brand. Ladbrokes and Neds target the Australian public and they require an Australian phone number to sign up. These brands validate the phone number using a general validation that matches Australian phone numbers. The regular expression used to validate the phone numbers is:
^((\\+\\d{2})|0)\\d{8,10}$
TabNZ and Betcha target New Zealand customers and requires a NZ phone number to sign up. The regular expression used in this case is more specific to NZ:
^((\+64)|0)2\d{7,9}$
Customer Support phone number:
The two screens of the password recovery flow have a footnote prompting users to call the customer support phone number if they face any issues while trying to recover their password. On taping the "call us" link in that footnote, the phone app will open with the customer support phone number, ready to dial. The phone number for these links is different for each brand and is retrieved from the App Configuration Module as described below.
Customer Support phone number link in screen 1:
Customer Support phone number link in screen 2:
Integrations
Feature Flags
The topic of having a feature flag for this feature was discussed a number of times. The decision was that, given the simplicity and small size of the feature, a feature flag was not required.
Configuration
As mentioned before, the Customer Support phone number is different for each brand and is retrieved from the App Configuration Module with the following key:
domain.phones.customerSupport
- Customer Support Phone Number
Outputs
REST: POST client/reset-password?
- This endpoint is where the password reset request is sent to. It takes the user's email or phone number, and date of birth entered in the flow's first screen and returns a successful response if the request was processed successfully. If the data entered matches that of an existing user, an email or text message will be sent to the user with instructions on how to reset their password. It is important to note that, due to privacy reasons, this endpoint will not respond with a success or failure based on whether the user was found in the database or not. It will simply respond with success if the data was processed successfully.
Third-Party Dependencies
Lottie Animations SDK
The second screen of the password recovery flow includes an animated check indicating that the request was sent successfully. This animation is a lottie animation and therefore the Lottie Animation SDK is used to display it.
Due to an issue with importing the iOS Lottie SDK in both React Native and Native iOS, this image is static on the iOS apps. This will be resolved once https://jira.production.corporate.ladbrokes.cloud/browse/NATPLAT-3022 is completed
Android
The Forgot Password feature in Android can be found under the feature:authentication
module under it's own com.entaingroup.mobile.auth.passwordrecovery
package.
The two screens are built as Dialog Fragments given they are modal screens, and they use the same compose PasswordRecoveryTopAppBar
which contains the title and navigation buttons.
iOS
TODO
Resources
Role | Contact |
---|---|
PM | TBC |
Android Lead | Anthony Librio |
iOS Lead | Nicholas Vella |