# Use Case 2.1 Setup a remote PIN and biometric unlock
## Overview
| Aspect | Description |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Summary** | The user chooses and confirms a secure 6-digit remote Personal Identification Number (PIN) for the app, and enables biometric unlock if supported and desired. |
| **Goal** | Securing the App with PIN and optionally biometrics. |
| **Preconditions** | *None* |
| **Postconditions** |
- Remote PIN is configured.
- If selected, biometric unlock is configured.
|
| **Triggered by** | - User completes [UC1.1 Introduce the app](UC1.1_IntroduceTheApp.md)
|
| **Additional Documentation** | - [Wallet creation](../../architecture/use-cases/wallet-creation)
|
| **Possible errors** | - No internet
- Server unreachable
- Device incompatible
|
| **Logical Test Cases** | - [LTC61 PIN entries do not match, try again](../logical-test-cases.md#ltc61)
- [LTC62 PIN entries do not match, choose new PIN](../logical-test-cases.md#ltc62)
- [LTC63 PIN entry does not conform to policy](../logical-test-cases.md#ltc63)
- [LTC66 Setup PIN Happy flow](../logical-test-cases.md#ltc66)
- [LTC67 Setup PIN fails device does not pass app and key attestation](../logical-test-cases.md#ltc67)
- [LTC74 User skips setting up biometrics](../logical-test-cases.md#ltc74)
- [LTC75 Device does not support biometrics](../logical-test-cases.md#ltc75)
|
---
## Flow
| # | Description | Next |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| **1** | **PRIMARY SCENARIO** | |
| **1.1** | **System displays screen 'Choose PIN'**- Input: 6 digits (0-9) PIN field, in-app keyboard
- Actions: Back, Info
| |
| 1.1a | User enters PIN | 1.2 |
| 1.1b | User selects Back | Back |
| 1.1c | User selects Info | Go to: [UC9.2 Get app information](UC9.2_GetAppInformation.md) |
| **1.2** | **System validates entered PIN satisfies PIN policy**- Duration: 0.0 - 0.1 seconds
| |
| 1.2a | Case: PIN matches PIN policy | 1.3 |
| 1.2b | Case: PIN does not match PIN policy | 2 |
| **1.3** | **System displays screen 'Repeat PIN'**- Input: 6 digits (0-9) PIN field, in-app keyboard
- Actions: Back, Info
| |
| 1.3a | User enters PIN | 1.4 |
| 1.3b | User selects Back | Back |
| 1.3c | User selects Info | Go to: [UC9.2 Get app information](UC9.2_GetAppInformation.md) |
| **1.4** | **System validates PINs match, displays loading message**- Duration: 0.0 - 0.1 seconds
| |
| 1.4a | Case: PINs match | 1.5 |
| 1.4b | Case: PINs do not match (first time) | 3 |
| 1.4c | Case: PINs do not match (second time) | 4 |
| **1.5** | **System executes account setup, displays loading message**- Duration: 0.0 - 1.0 seconds
| |
| 1.5a | Case: Account setup succeeds | 1.6 |
| 1.5b | Error: Device insecure | Error flow: Device insecure |
| 1.5c | Error: No internet | Error flow: No internet |
| 1.5d | Error: Server unreachable | Error flow: Server unreachable |
| **1.6** | **System determines whether device supports biometrics**- Duration: 0.0 - 0.1 seconds
| |
| 1.6a | Case: Device supports biometrics | 1.7 |
| 1.6b | Case: Device does not support biometrics | 1.9 |
| **1.7** | **System displays screen 'Configure Biometrics'**- Message: Do you want to unlock the app with Face ID/Fingerprint?
- Actions: Enable, Skip, Info
| |
| 1.7a | User selects Enable | 1.9 |
| 1.7b | User selects Skip | 1.9 |
| 1.7c | User selects Info | Go to: [UC9.2 Get app information](UC9.2_GetAppInformation.md) |
| **1.8** | **Operating system prompts user for biometric authentication** | |
| 1.8a | User confirms with biometric authentication | 1.9 |
| 1.8b | User rejects biometric authentication | 1.7 |
| **1.9** | **System displays screen 'Confirm PIN/biometric setup'**- Message: Your NL Wallet is secured
- Actions: Next
| |
| 1.9a | User selects Next | Go to: [UC3.1 Obtain PID](UC3.1_ObtainPidFromProvider.md) |
| **2** | **WHEN PIN DOES NOT SATISFY POLICY (TOO SIMPLE)** | |
| **2.1** | **System displays prompt 'PIN too simple'** | |
| 2.1a | User selects OK | 1.3 |
| **3** | **WHEN PINs ARE NOT EQUAL (FIRST TIME)** | |
| **3.1** | **System displays prompt 'PIN is different, retry'** | |
| 3.1a | User selects Try again | 1.3 |
| **4** | **WHEN PINs ARE NOT EQUAL (SECOND TIME)** | |
| **4.1** | **System displays prompt 'PIN is different, start over'** | |
| 4.1a | User selects Start over | 1.1 |