# Use Case 2.3 Unlock the app
## Overview
| Aspect | Description |
|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Summary** | The user unlocks the app either by using biometrics or entering a PIN, with fallback options including PIN recovery or wallet deletion if access fails. |
| **Goal** | Unlocking the app. |
| **Preconditions** | *None* |
| **Postconditions** | *None* |
| **Triggered by** |
- User completes [UC1.2 Open the app](UC1.2_OpenTheApp.md)
|
| **Additional Documentation** | *None* |
| **Possible errors** | - No internet
- Server unreachable
|
| **Logical Test Cases** | - [LTC47 Unlock app with correct PIN](../logical-test-cases.md#ltc76)
- [LTC48 Unlock app with biometric](../logical-test-cases.md#ltc77)
- [LTC49 Unlock app with invalid biometric](../logical-test-cases.md#ltc49)
- [LTC50 Unlock app with invalid PIN](../logical-test-cases.md#ltc50)
|
---
## Flow
| # | Description | Next |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| **1** | **PRIMARY SCENARIO** | |
| **1.1** | **System determines whether biometrics are enabled**- Duration: 0.0 - 0.1 seconds
| |
| 1.1a | Case: Biometrics are enabled | 2 |
| 1.1b | Case: Biometrics are not enabled | 1.2 |
| **1.2** | **System scans biometrics** | |
| 1.2a | Case: Valid biometric | Go to: [UC7.1 Show all available cards](UC7.1_ShowAllAvailableCards.md) |
| 1.2b | Case: Invalid biometric (first time iOS) | 2 |
| 1.2c | Case: Invalid biometric (second time iOS) | 3 |
| 1.2d | Case: Invalid biometric (first till fourth time Android) | 4 |
| **1.3** | **System shows screen 'Open app with PIN'**- Message: Open with your PIN
- Input: 6 digits (0-9) PIN field
- Actions: Info, Forgot Pin
| |
| 1.3a | User enters PIN | 1.4 |
| 1.3b | User selects Forgot PIN | 6 |
| 1.3c | User selects Info | Go to: [UC9.2 Get app information](UC9.2_GetAppInformation.md) |
| **1.4** | **System executes partial flow [PF2.8 Validate PIN](../partial-flows/PF2.8_ValidatePin.md)** | |
| 1.4a | Result: Confirm | 1.5 |
| 1.4b | Result: Retry | 1.3 |
| 1.4c | Result: Back | Back |
| **1.5** | **System determines whether user has obtained PID**- Duration: 0.0 - 0.1 seconds
| |
| 1.5a | Case: User has obtained PID | 1.6 |
| 1.5b | Case: User has not obtained PID | Go to: [UC3.1 Obtain PID](UC3.1_ObtainPidFromProvider.md) |
| **1.6** | **System executes partial flow [PF2.7 Resolve a universal link](../partial-flows/PF2.7_ResolveUniversalLink.md)** | |
| 1.6a | Result: No (valid) universal link | 1.7 |
| **1.7** | **System determines whether app was shutdown before unlocking** | |
| 1.7a | Case: App was active (iOS: resume, Android: hot start) | Resume1 |
| 1.7b | Case: App was shutdown (iOS: launch, Android: cold or warm start) | Go to: [UC7.1 Show all available cards](UC7.1_ShowAllAvailableCards.md) |
| **2** | **WHEN BIOMETRIC IS INVALID, FIRST TIME IOS** | |
| **2.1** | **System displays prompt 'Biometric not recognized'**- Actions: Try again, Close
| |
| 2.1a | User selects Close | 1.3 |
| 2.1b | User selects Try again | 2.1 |
| **3** | **WHEN BIOMETRIC IS INVALID, SECOND TIME IOS** | |
| **3.1** | **System displays prompt 'Biometric not recognized enter your PIN'**- Actions: Enter Password, Cancel
| |
| 3.1a | User selects Enter Password | 1.3 |
| 3.1b | User selects Cancel | 1.3 |
| **4** | **WHEN BIOMETRIC IS INVALID, FIRST TIME ANDROID** | |
| **4.1** | **System displays message 'Biometric not recognized'**- Actions: Try again, Close
| |
| 4.1a | User selects Close | 1.3 |
| 4.1b | User selects Try again | 2.1 |
| **5** | **WHEN BIOMETRIC IS INVALID, FIFTH TIME ANDROID** | |
| **5.1** | **System displays prompt 'Too many failed attempts. Open with PIN'** | |
| 5.1a | User selects Close | 5.2 |
| **5.2** | **System displays prompt 'Biometric not recognized, enter your PIN'** | |
| 5.2a | User selects OK | 1.3 |
| **6** | **RECOVER FROM FORGOTTEN PIN** | |
| **6.1** | **System displays forgot PIN screen**- Forgot PIN?
- Actions: Delete Wallet, Back
| |
| 6.1a | User selects Delete Wallet | Go to: [UC9.4 Wipe all app data](UC9.4_WipeAllAppData.md) |
| 6.1b | User selects Back | Back |
1. Resume the state when the app backgrounded/suspended.