Skip to content

Beyond the Basics

Implementing basic email/password authentication via Passport is a massive milestone. But in the landscape of web security, “basic” is just the baseline.

As our applications grow in complexity and user volume, our security posture must scale alongside them.

Professor Solo: Security is a continuous process, not a destination. We don’t just “install” security; we aggressively manage it against evolving threats.

Once the foundation is solid, modern applications typically expand their authentication footprint by implementing:

  • Password Reset Architecture: Building secure, time-sensitive flows using JSON Web Tokens (JWTs) emailed directly to the user to prove account ownership during recovery.
  • Email Verification Pipelines: Structurally preventing users from accessing the application until they have clicked a secure, cryptographic confirmation link sent to their inbox, verifying that the provided email is real and belongs to them.
  • OAuth / SSO Integrations: Adding alternative Passport strategies (like passport-github2 or passport-google-oauth20) to allow users to bypass password creation entirely by delegating trust to centralized identity providers.
  • Advanced Hardening: Utilizing express middleware like helmet to automatically inject strict HTTP response headers that protect against clickjacking, cross-site scripting (XSS), and MIME-sniffing attacks.
  • Multi-Factor Authentication (MFA): Requiring a secondary form of validation, such as a Time-Based One-Time Password (TOTP) generated by an authenticator app, before granting access.

T.A. Watts Note: Don’t try to build all of this at once. Start with a solid foundation, establish a baseline, and then add these advanced features incrementally as the application requirements dictate.

We have successfully locked the door. We know exactly who is knocking, and we know they have the correct keys.

But logging in is only half the battle.

What happens when an intern logs into the CMS to publish a new blog post, but accidentally clicks the “Delete Entire Content Database” button because we forgot to hide it from them?

Knowing who someone is does not inherently dictate what they are allowed to do. To solve that, we must formally introduce Authorization.


You’ve read the theory. Now it’s time to test your skills.