Overview
The passcode is never persisted to disk. It only exists in memory during your session and protects against unauthorized physical access to your unlocked device.
How It Works
- PasscodeGate component wraps the app
- On launch, checks if passcode is set in settings store (memory-only)
- If set, displays PasscodeScreen until correct PIN is entered
- Once unlocked, app content is rendered
Setting Up a Passcode
1
Navigate to Settings
Open the app and tap Settings → Security → Set Passcode.
2
Enter Your PIN
Enter a 4-digit PIN code using the numeric keyboard.
3
Confirm Your PIN
Re-enter the same 4-digit code to confirm.
4
Passcode Active
Your passcode is now active and will be required on next app launch.
Passcode Settings Screen
The passcode configuration flow has two steps:- Create
- Confirm
Enter new passcode
- Numeric keyboard with digits 0-9
- 4 dots showing entry progress
- Automatically advances to confirmation when 4 digits entered
Create Step (app/settings-pages/passcode.tsx:24-38)
Passcode Entry Screen
When the app is locked, users see:
- User avatar and welcome message
- 4-dot progress indicator
- Numeric keyboard (0-9 + backspace)
- Shake animation on incorrect entry
- Fade-out animation on success
Numeric Keyboard
The custom numeric keyboard provides:- Digits 0-9: Standard numeric input
- Backspace (⌫): Delete last digit
- Haptic feedback: Button press and action haptics
- Ripple animations: Visual feedback on tap
Security Characteristics
Memory-Only Storage
The passcode is never written to disk. It only exists in the Zustand store’s memory state.
stores/settingsStore.ts:235-252:
Persistence Configuration
Threat Model
Protects against unauthorized access to unlocked device
Prevents casual snooping by others nearby
Adds friction for physical theft scenarios
Limitations
- Session-based: Passcode is lost when app is fully terminated
- 4-digit only: Limited entropy (10,000 possible combinations)
- No biometric option: PIN-only (biometrics planned for future)
- No rate limiting: Can attempt unlimited passcodes (mitigated by manual entry slowness)
For maximum security, combine passcode lock with full-disk encryption and device lock screen protection.
Resetting Your Passcode
If You Remember Current Passcode
1
Enter App
Unlock with your current passcode.
2
Clear Passcode
Go to Settings → Security → Clear Passcode.
3
Set New Passcode
Optionally set a new passcode immediately.
If You Forgot Your Passcode
1
Ensure You Have Seed Phrase
Locate your 12-word recovery phrase backup. Without it, you will lose access to your funds.
2
Uninstall Sovran
Remove the app from your device. This clears all local data including the passcode.
3
Reinstall and Restore
Install Sovran fresh and restore from your seed phrase.
4
Set New Passcode
Configure a new passcode (optional).
Best Practices
Choose a Strong PIN
Avoid obvious codes like 1234, 0000, or your birth year.
Remember Your PIN
Use a memorable but non-obvious number. Write it down separately from your seed phrase.
Device Lock First
Enable device-level lock screen protection as primary security.
Seed Phrase Backup
Always maintain a secure backup of your seed phrase in case you need to reinstall.
Related Documentation
Wallet Recovery
Restore from seed phrase if passcode is lost
Privacy Features
Other privacy protections in Sovran