# Use Case 2.3.2 Recover PIN
## Overview
| Aspect | Description |
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Summary** | The user forgets PIN, then authenticates at DigiD and choosing and confirming a new PIN that meets policy requirements. |
| **Goal** | Recover from a forgotten remote PIN and regain access to the app. |
| **Preconditions** | *None* |
| **Postconditions** |
- User has regained access and can use the new PIN in the Wallet.
- Old PIN can not be used anymore.
|
| **Triggered by** | - User selects 'Forgot PIN' in [PF2.4 Confirm a protected action](../partial-flows/PF2.4_ConfirmProtectedAction.md), [PF2.8 Validate PIN](../partial-flows/PF2.8_ValidatePin.md) or [UC2.3 Unlock the app](UC2.3_UnlockTheApp.md)
|
| **Additional Documentation** | - [PIN validation](../../architecture/use-cases/pin-validation)
|
| **Possible errors** | *None* |
| **Logical Test Cases** | - [LTC41 Recover PIN](../logical-test-cases.md#ltc41)
|
---
## Flow
| # | Description | Next |
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| **1** | **PRIMARY SCENARIO** | |
| **1.1** | **Displays screen 'Forgot PIN'**- Message: Create a new PIN to regain access
- Actions: Forgot PIN, Back, Help
| |
| 1.1a | User selects Forgot PIN | 1.2 |
| 1.1b | User selects Back | Back |
| 1.1c | User selects Help | Show placeholder 'under construction' |
| **1.2** | **Displays screen 'Login with DigiD'**- Message: This way you can create a new PIN
li>Actions: Open the DigiD app, To DigiD website, Back, Help
| |
| 1.2a | User selects Open the DigiD app | 1.3 |
| 1.2b | User selects To DigiD website
→ System opens DigiD website in browser and suspends app | |
| 1.2c | User selects Back | Back |
| 1.2d | User selects Help | Show placeholder 'under construction' |
| **1.3** | **System awaits DigiD response and displays screen 'Continue with DigiD'**- Message: Continue in DigiD app to get your data
- Actions: Stop
| |
| 1.3a | Event: DigiD returns control to System, authentication successful | 1.4 |
| 1.3b | Event: DigiD returns control to System, authentication failed | 2 |
| 1.3c | Event: DigiD returns control to System, login stopped or session expired | 3 |
| 1.3d | Event: DigiD returns control to System, wrong DigiD account | 4 |
| 1.3e | User selects Stop | 5 |
| **1.4** | **System executes partial flow [PF2.9 Setup PIN](../partial-flows/PF2.9_SetupPin.md)** | |
| 1.4a | Result: PIN setup succeeds | 1.5 |
| 1.4b | Result: Back | Back |
| 1.4c | Result: Stop | 1.2 |
| **1.5** | **System displays screen 'You have access again'**- Message: Remember your PIN
- Actions: To my overview, See activity
| |
| 1.5a | User selects To my overview | Go to: [UC7.1 Show all avail able cards](./UC7.1_ShowAllAvailableCards) |
| 1.5b | User selects See activity | Go to: [UC6.3 Show event](UC6.3_ShowHistoryEvent.md) |
| **2** | **WHEN DIGID AUTHENTICATION FAILS** | |
| **2.1** | **System displays screen 'Login failed'**- Message: Login again to get data
- Actions: Login again, Go to DigiD website
| |
| 2.1a | User selects Login again | 1.3 |
| 2.2b | User selects Go to DigiD website
→ System opens DigiD website in browser and suspends app | |
| **3** | **WHEN USER ABORTS OR EXPIRES** | |
| **3.1** | **System displays screen 'Login stopped'**- Message: To continue login again
- Actions: Login again, Go to DigiD website
| |
| 3.1a | User selects Login again | Back |
| 3.1b | User selects Go to DigiD website | |
| **4** | **WHEN USER LOGS IN WITH WRONG DIGID ACCOUNT** | |
| **4.1** | **System displays screen 'Wrong DigiD'**- Message: This NL Wallet does not belong to this DigiD account
- Actions: Login again, Go to DigiD website
| |
| 4.1a | User selects Login again | 1.3 |
| 4.2b | User selects Go to DigiD website
→ System opens DigiD website in browser and suspends app | |
| **5** | **WHEN USER ABORTS DIGID FROM APP** | |
| **5.1** | **System displays prompt 'Stop DigiD login?'**- Actions: Cancel, Stop Login
| |
| 5.1a | User selects Cancel | Back |
| 5.1b | User selects Stop Login | 4.2 |
| **5.2** | **System displays screen 'Login stopped'**- Actions: Login again, Go to DigiD website
| |
| 5.2a | User selects Login again | 1.3 |
| 5.2b | User selects Go to DigiD website
→ System opens browser and suspends app | |