Cybersecurity
Two-Factor Authentication System
Jun 2025
A Python authentication project implementing time-based one-time passwords and QR-code based authenticator enrolment.

Project Overview
What I built
This project explores how two-factor authentication can strengthen a conventional login process by introducing possession-based verification through a rotating time-based one-time password. It provided practical experience implementing authentication concepts rather than only studying them theoretically.
Challenge
The problem I needed to solve
The system needed to securely generate a shared secret, make that secret usable by an authenticator application, and validate short-lived codes while understanding why expired or incorrect codes should not be accepted.
Approach
How I approached it
I used Python with PyOTP to generate and validate TOTP codes and the QRCode library to create an enrolment QR code that could be scanned by compatible authenticator applications. The project demonstrated the relationship between a shared secret, time intervals, and temporary authentication codes.
Implementation
Key implementation details
- Implemented time-based one-time password authentication using Python and PyOTP.
- Generated QR codes for authenticator application enrolment.
- Validated rotating time-sensitive authentication codes.
- Applied shared-secret and time-based verification concepts.
- Developed practical understanding of multi-factor authentication workflows.