Study Pluggable Authentication Modules, focus on multi-factor authentication setups, configure multi-factor authentication for some common service (sshd).
Study HTTP, focus on its state-less nature.
Investigate the possibility of using full PAM stack in web applications, including multi-step conversations.
Develop a solution which would allow the use of the PAM conversation over the web.
Create prototype web application/setup to demonstrate the use of the solution using FreeOTP.