Better Programming

Advice for programmers.

Member-only story

Please Stop Writing Your Own User Authentication Code

8 min readApr 8, 2020

--

Photo by Kyle Glenn on Unsplash

Most apps require some sort of authentication. You might be a developer working for a large company on their line-of-business apps, which require limiting access to authorized employees and checking their permissions. Or you might be building a new SaaS app, and you want users to create and maintain their profiles.

In both those cases and more, your first step when building the app will likely be creating the authentication and user management workflows. That is, creating a sign-up form and a login page, at the very least. Authentication is one of the most common features developers working on web apps are asked to implement, yet it’s also one of the most overlooked ones.

Building a safe authentication system is a really hard task, much harder than you’d think, and very easy to get wrong. Even worse, mistakes can have catastrophic effects. At its core, user management and authentication require just a few web forms, and it could appear to be a very simple task. However, the devil is in the detail, and building those things securely (and in a privacy-conscious way, when possible or even required) is no small feat.

Identity-as-a-Service

--

--

Alessandro Segala
Alessandro Segala

Written by Alessandro Segala

Cooker of great risotto. Sometimes tech nerd. Driving dev tools, @code & open source @Microsoft @Azure ☁️ Opinions are mine 🇮🇹🇨🇦🇺🇸