Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

How to Build Passwordless Auth Using TOTP With Twilio Verify in Node.js

Blog post from Twilio

Post Details
Company
Date Published
Author
Matthew Setter, Dhruv Patel
Word Count
4,181
Company Posts That Month
29
Language
English
Hacker News Points
-
Post removed?
No
Summary

Published in August 2026, this Twilio tutorial demonstrates how to build a simple Node.js web application that uses Twilio Verify and time-based one-time passwords (TOTP) for passwordless-style authentication through an authenticator app such as Authy or Google Authenticator. It explains a three-stage workflow in which a user submits a username, receives a Twilio Verify TOTP Factor represented by a QR code and setup secret, verifies the factor by entering an initial six-digit code, and later authenticates with newly generated TOTP codes. The implementation uses Express, EJS templates, sessions, dotenv, QR code generation, and Twilio’s Node.js helper library, with environment variables storing Twilio credentials, a Verify Service SID, and a session secret. Routes create and store Factor information in a session, prevent access to verification pages without a valid factor, update the factor after initial verification, and create challenges to validate subsequent codes. The tutorial concludes with instructions for adding CSS, starting the server on port 8080, testing the setup locally, and noting that TOTP-based authentication can reduce password-related risks and login friction while adding application complexity.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.