Overview
Creating a PIN
Set during the registration flow after email and phone verification.
Entering a PIN
Required on every login to complete authentication.
Resetting a PIN
Available from the authenticated profile area when the user needs to change their PIN.
Creating a PIN
PIN creation is the final step of registration, after both email and phone have been verified.Enter new PIN
Screen: On success, the app navigates to
CreatePinInput (src/screens/Authentication/CreatePin/CreatePinInput.jsx)
Route: CREATE_PIN_INPUTThe user enters a 4-digit PIN using the OTPInput component.Request body
CONFIRM_PIN, forwarding uuid and the entered pin.Confirm PIN
Screen: On success, the JWT token from
ConfirmPin (src/screens/Authentication/CreatePin/ConfirmPin.jsx)
Route: CONFIRM_PINThe user re-enters the same PIN to confirm it.Request body
data.success.user.token is written to AsyncStorage and the user object is stored in useAuthStore.Entering a PIN at login
Screen:EnterPin (src/screens/Authentication/Login/EnterPin.jsx)
Route: ENTER_PIN
After supplying their phone number on the LOGIN screen, the user enters their PIN here. Both values are sent together in a single request:
Request body
The field is named
password in the login request body, but it carries the same 4-digit PIN value that was set during registration.loggedIn: true in useAuthStore.
Resetting a PIN
PIN reset is available inside the authenticated app (from the Profile area). The flow lives insrc/screens/Profile/RestPin/.
Enter new PIN
Screen: On success, the app navigates to
ResetPinInput (src/screens/Profile/RestPin/ResetPinInput.jsx)
Route: RESET_PIN_INPUTThe user enters a new 4-digit PIN.Request body
RESET_CONFIRM_PIN, passing new_pin as a route param.Confirm new PIN
Screen: The server response must include
ResetConfirmPin (src/screens/Profile/RestPin/ResetConfirmPin.jsx)
Route: RESET_CONFIRM_PINThe user re-enters the new PIN. Client-side validation checks that:- The entry is exactly 4 digits.
- The value matches
new_pinfrom the previous step.
Request body
message: "Pin reset successful!" for the reset to be considered successful. Any other response body triggers an error toast.PIN for payment confirmation
Screen:PayEnterPin (src/screens/Alert/PayEnterPin/index.jsx)
Route: PAY_ENTER_PIN
When a user needs to approve or reject an incoming payment request, they must re-enter their PIN before the action is submitted.
The
PAY_ENTER_PIN screen actually calls POST /v2/payment-request-action (not confirm_payment_with_pin directly). The confirm_payment_with_pin endpoint is used for scan-and-pay flows.Request body
- If
typeis"approve", the app navigates toREQ_PAYMENT_SUCCESS. - If
typeis"reject", the app navigates toREQ_PAYMENT_FAIL.
doss_dashboard and transaction_history query caches are invalidated after a successful action.
Group PIN
Screen:EnterGroupPin (src/screens/Profile/Preferrences/Group/EnterGroupPin/index.jsx)
Route: ENTER_GROUP_PIN
Joining a DOSS group requires a 6-digit invite code (not the user’s personal 4-digit PIN).
Request body
doss_groups query cache is invalidated and the app navigates back to the previous screen.
PIN validation rules
| Context | Expected length | Validation |
|---|---|---|
Create PIN (set_pin) | 4 digits | Client-side length check before API call |
Confirm PIN (confirm_pin) | 4 digits | Client-side length check before API call |
Login PIN (new-login) | 4 digits | Client-side length check before API call |
Reset PIN (resetPin) | 4 digits | Client-side length check before API call |
Confirm reset PIN (confirmPin) | 4 digits | Client-side length check + must match new_pin |
Payment PIN (payment-request-action) | 4 digits | Client-side length check before API call |
Group invite code (join_group) | 6 digits | Client-side length check before API call |