+-------------------+ +-------------------+ +-------------------+
| | | | | |
| User chooses | | Password stored | | 2FA device/app |
| password | | securely | | generates codes |
| | | | | |
+---------+---------+ +---------+---------+ +---------+---------+
| | |
| | |
+---------------------------+---------------------------+
|
+-------v-------+
| |
| Authentication|
| System |
| |
+-------+-------+
|
+-------v-------+
| |
| Access |
| Granted or |
| Denied |
+---------------+This diagram shows how the user chooses a password stored securely, optionally sets up a 2FA device that generates codes, and how the authentication system checks both to grant or deny access.