Draw a flowchart that shows the process of two-factor authentication (2FA) for a user logging into a website. Include steps for entering username and password, verifying credentials, sending a code to the user's phone, entering the code, and granting or denying access.
10 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Grading Criteria
Start and End symbols present
User input steps included (username/password and code)
Decision diamonds used for credential and code checks
Separate paths for correct and incorrect checks
Final access granted or denied outcomes shown
Solution
+---------------------+
| Start |
+----------+----------+
|
v
+---------------------+
| Enter username & |
| password |
+----------+----------+
|
v
+---------------------+
| Check credentials |
+----------+----------+
|
+------+------+
| |
v v
+------------+ +----------------+
| Credentials| | Deny access & |
| correct? | | End |
+-----+------+ +----------------+
|
v
+---------------------+
| Send code to phone |
+----------+----------+
|
v
+---------------------+
| Enter code received |
+----------+----------+
|
v
+---------------------+
| Check code correct? |
+-----+------+--------+
| |
v v
+------------+ +----------------+
| Grant access| | Deny access & |
| & End | | End |
+------------+ +----------------+
This flowchart starts with the user entering their username and password.
Next, the system checks if the credentials are correct. If not, access is denied and the process ends.
If credentials are correct, the system sends a code to the user's phone.
The user then enters the received code.
The system checks if the entered code matches the sent code.
If the code is correct, access is granted and the process ends.
If the code is incorrect, access is denied and the process ends.
Variations - 2 Challenges
[intermediate] Draw a flowchart for two-factor authentication that includes a step for the user to choose between receiving the code via SMS or email before entering the code.
[advanced] Draw a detailed flowchart for two-factor authentication that includes retry limits for entering the code and locks the account after 3 failed attempts.
Practice
(1/5)
1. What is the main purpose of two-factor authentication (2FA)?
easy
A. To allow users to log in without any password
B. To make passwords shorter and easier to remember
C. To add an extra layer of security by requiring two ways to prove identity
D. To speed up the login process by skipping verification
Solution
Step 1: Understand what 2FA means
Two-factor authentication means using two different methods to confirm who you are.
Step 2: Identify the main goal of 2FA
The goal is to make it harder for others to access your account by adding extra security.
Final Answer:
To add an extra layer of security by requiring two ways to prove identity -> Option C
Quick Check:
Extra security = To add an extra layer of security by requiring two ways to prove identity [OK]
Hint: 2FA means two ways to prove identity, not shortcuts [OK]
Common Mistakes:
Thinking 2FA makes passwords shorter
Believing 2FA removes the need for passwords
Assuming 2FA speeds up login by skipping steps
2. Which of the following is a correct example of a second factor in two-factor authentication?
easy
A. A code sent to your phone via SMS
B. A password you create
C. Your username
D. Your email address
Solution
Step 1: Identify what counts as a second factor
The second factor is something you have or receive, like a code sent to your phone.
Step 2: Compare options to the second factor definition
A password and username are first factors; a code sent to your phone is a second factor.
Final Answer:
A code sent to your phone via SMS -> Option A
Quick Check:
Second factor = code on phone [OK]
Hint: Second factor is usually a code or device, not password [OK]
Common Mistakes:
Confusing password as second factor
Thinking username or email is a second factor
Ignoring the difference between first and second factors
3. Consider this flowchart for a login process with two-factor authentication:
What happens if the password is correct but the code is wrong?
medium
A. Access is granted immediately
B. Access is denied after code verification fails
C. User is asked to enter the password again
D. User is logged in without code verification
Solution
Step 1: Follow the flowchart steps
The user enters password first; if correct, then code is requested.
Step 2: Check what happens if code is wrong
If the code verification fails, the flowchart shows access is denied.
Final Answer:
Access is denied after code verification fails -> Option B
Quick Check:
Wrong code = access denied [OK]
Hint: Both password and code must be correct to access [OK]
Common Mistakes:
Assuming password alone grants access
Thinking user retries password after code fails
Ignoring the code verification step
4. A user complains they cannot log in even after entering the correct password and code. Which of these is a likely error in the two-factor authentication process?
medium
A. The password was too simple
B. The user entered the wrong username
C. The user did not enter any code
D. The code sent to the user expired before use
Solution
Step 1: Analyze the problem with correct password and code
If the password and code are correct but login fails, the code might have expired.
Step 2: Eliminate other options
Wrong username or no code would cause different errors; password simplicity does not block login.
Final Answer:
The code sent to the user expired before use -> Option D
Quick Check:
Expired code blocks login [OK]
Hint: Expired codes cause login failure despite correct input [OK]
Common Mistakes:
Blaming password strength for login failure
Ignoring code expiration time
Assuming username error when password is correct
5. You want to improve your online account security using two-factor authentication. Which combination below is the best choice?
hard
A. Password + fingerprint scan on your phone
B. Password + security question answer
C. Password + username
D. Password + code sent by email
Solution
Step 1: Identify strong second factors
Biometric methods like fingerprint scans are stronger and harder to fake than codes or questions.
Step 2: Compare options for security
Code by email can be intercepted; username is not a factor; security questions can be guessed.
Final Answer:
Password + fingerprint scan on your phone -> Option A
Quick Check:
Biometric second factor = strongest security [OK]
Hint: Biometrics + password is stronger than codes or questions [OK]
Common Mistakes:
Thinking username is a second factor
Believing email codes are always safest
Underestimating security questions' weakness
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.