Track 07 · Lesson 17 of 18Identity and login

Track 07 · Identity and login

Trade-offs and common mistakes

Lesson 17 of 18· 6 min

No auth design is free. These are the costs and pitfalls that show up again and again in real projects. Each one says why teams accept or fall into it, and what fixes it.

Costs and common mistakes

Open each one; flag the ones in your project

0 flagged in your project

The high-severity four#

Tokens in localStorage, logging users out on transient errors, authorization only in the UI, and a Content Security Policy that still allows inline scripts. Each one turns a single bug or a short outage into a much bigger problem, and each has a well-known fix you’ve already seen in this track.

Costs you choose on purpose#

Some entries aren’t mistakes: they’re the price of a design. In-memory tokens cost a refresh on every page load. A BFF makes your frontend server part of login. Logging out of one device leaves the others signed in, usually deliberately. Know which of these you’re paying, and monitor them.

Docs drift#

Auth docs tend to describe an older storage or refresh scheme. When the docs and the code disagree, the code wins: fix the docs in the same pull request.

Check yourself

Your refresh code logs users out on any failure. What happens during a 30-second auth-server outage?