Cybersecurity · Authentication
Build a two-factor authentication demo
Add time-based one-time codes to a login page and explain how they are generated.
- DifficultyIntermediate
- Estimated time1–2 weeks
- Budget₹0
- ClassClass 12 to college
- TeamSolo or up to 2
- You needComputer only
Prerequisites: None beyond your class work
Original · by TechnifyedPortfolio ProjectSoftware ProjectFree to doComputer onlyPortfolio focused
Overview
Add time-based one-time codes to a login page and explain how they are generated.
Skills you will use
Safety
- Practise only on your own devices, accounts and networks, or on labs made for training. Testing systems you do not own without written permission is illegal.
Materials and tools
- Computer with Python and Flask
- An authenticator app on a phone
Tools and software
Step-by-step roadmap
Start
You will finish with: a login flow with working two-factor codes and a diagram of the algorithm.
- 1
Prerequisites
Nothing special to know first. Then collect the 2 items in the materials list.
- 2
Learn
Read up on authentication: 2FA, login security, TOTP. Your textbook chapter and one short video are enough.
- 3
Plan
List the features for version one, sketch the screens or data flow and pick the tools. Keep the first version small.
- 4
Build
- Build registration and login with properly hashed passwords.
- Generate a secret per user and show it as a QR code.
- Verify the six-digit code at login.
- Add backup codes.
- Limit attempts and log failures.
- 5
Test
Try it with wrong, empty and unusual input, and ask someone else to use it without your help.
- 6
Document
Write a README: what it does, how to run it, screenshots and what you learned. Report structure
- 7
Present
Show a live demo of one complete task, then the design and the hardest problem you solved. Presentation structure
- 8
Publish
Put the code on GitHub with the README and, if you can, deploy a live demo.
Expected outcome
A login flow with working two-factor codes and a diagram of the algorithm.
Other versions of this project
Advanced version
Implement the code generation yourself from the standard and compare with the library.
Ways to do this project
Text marked "You write this" is a prompt for your own work; everything else is specific to this project.
Use this as the outline of your README or case study.
- Problem
- You write thisThe problem in one or two sentences.
- Why it matters
- You write thisWho has this problem and what it costs them.
- What was built
- A login flow with working two-factor codes and a diagram of the algorithm.
- Technology
- Flask, Python
- Architecture
- You write thisOne diagram: the parts and how data moves between them.
- Implementation
- You write thisThe 5 build steps in your own words, with one code or design decision you are proud of.
- Challenges
- You write thisThe hardest bug or decision, and how you got past it.
- Results
- You write thisNumbers: accuracy, speed, users, survey answers.
- Demo and code
- You write thisA link to a live demo or a short video, and to the GitHub repository.
- Lessons learned
- You write thisWhat you would do differently next time.
- Future improvements
- Implement the code generation yourself from the standard and compare with the library.
- Problem
- Add time-based one-time codes to a login page and explain how they are generated.
- Target user
- You write thisOne specific person: who they are and when they would use this.
- Solution
- Add time-based one-time codes to a login page and explain how they are generated.
- First version (MVP)
- You write thisThe smallest version that shows the idea working once, end to end.
- Tech stack
- Flask, Python
- Architecture
- You write thisA quick sketch of the parts and how they connect.
- Demo
- You write thisThe one scenario you will show live, start to finish, in under two minutes.
- Stretch goals
- Implement the code generation yourself from the standard and compare with the library.
Team roles
Plan by length
24-hour
- Hours 0–2: agree the problem, the user and the one thing the demo must show
- Hours 2–16: build only the first version
- Hours 16–20: test the demo path end to end and fix what breaks
- Hours 20–24: slides, a 2-minute demo script and a backup recording
48-hour
- Evening 1: problem, user, sketch and task split
- Day 1: first version working end to end
- Day 2 morning: one stretch goal and testing
- Day 2 afternoon: polish, slides and demo practice
1-week
- Day 1: research the problem and talk to two possible users
- Days 2–4: first version
- Day 5: stretch goals
- Day 6: testing and write-up
- Day 7: demo video and presentation
Working as a team
Solo or up to 2. Suggested roles:
Report and presentation
Report structure
- Title and summary
- Problem and target user
- Features
- Tools and technology
- Design: architecture, data model or screens
- Implementation
- Testing
- Results and screenshots
- Challenges
- Future improvements
- References
Presentation structure
- The problem
- Who it is for
- Live demo
- How it is built (one diagram)
- The hardest part
- Testing and results
- What you learned
- What comes next
Viva questions
Prepare your own answers to these before you present.
- What is the aim of your project, in one sentence?
- What is the principle behind it?
- Why did you choose these materials or tools?
- What result did you get, and was it what you expected?
- What went wrong and how did you fix it?
- How could this be improved or used in real life?
Resources
Source and attribution
Original
Written by Technifyed. Free to use for your own school or college project; write the report in your own words. Added 1 Oct 2026.
Similar projects
More Cybersecurity projects
Cybersecurity · Authentication
Build a password strength checker
Score a password's strength, explain why, and estimate how long it would take to guess.
Cybersecurity · Secure Coding
Write a secure-coding checklist from real bugs
Study ten public security fixes in open-source projects and turn them into a review checklist.
Cybersecurity · Digital Forensics
Recover deleted files from a test drive
Delete files on a spare USB drive, image it and see what can be recovered and why.
Cybersecurity + Systems and Cloud
Analyse your own home network traffic
Capture traffic on your own computer and identify which protocols and services it talks to.
Same tools
Physics + Programming
Simulate projectile motion with air drag in Python
Plot real trajectories with air resistance and compare them with the textbook parabola.
Artificial Intelligence · Deep Learning
Classify handwritten digits with a neural network
Train a small neural network on the MNIST digits and study where it goes wrong.
Artificial Intelligence · NLP
Detect spam messages with a text classifier
Train a model on a public SMS dataset to separate spam from normal messages.
Literature and English + Data
Analyse word use in a novel with a computer
Count words and character mentions in a public-domain novel and see what the numbers reveal.
Two-subject alternatives
Public Policy and Governance + Cybersecurity
Debate how social media should be regulated
Research one proposal for regulating online platforms and present the strongest case for and against.
Programming + Cybersecurity
Make a file encryption tool
Encrypt and decrypt files with a password using a well-tested library.
Artificial Intelligence + Cybersecurity
Build a face-blurring privacy tool
Detect faces in photos and blur them automatically before sharing.
Pure Mathematics + Cybersecurity
Break a secret with number theory: how RSA works
Encrypt and decrypt a message with small primes by hand, then in code, and see why large primes matter.
Same difficulty and budget
Robotics, IoT and Hardware + Mechanical Engineering
Design a mechanical part in CAD and simulate its stress
Model a bracket, apply a load in simulation and redesign it to be lighter and still strong.
Software Development · Mobile Apps
Build a habit tracker with streaks
Create an Android app to tick off daily habits and see streaks and a calendar heat map.
Data + Operations, HR and Supply Chain
Build a sales dashboard
Turn a public retail dataset into a one-page dashboard that answers a manager's questions.
Artificial Intelligence + Marketing
Cluster customers into groups
Group customers by spending behaviour with k-means and describe each group in plain words.