Back to examples
securityapi-keysauth

Durable first-party example

API key flash cookie security review

A security explainer that turns a new API key delivery pattern into a reviewable product note.

Artifact being explained

A security and UX explainer for showing a newly generated API key exactly once.

Target audience

Developers, security reviewers, and product owners.

Original problem

Putting a plaintext API key in a redirect URL would leak it through browser history, logs, and Referer headers.

Why a public URL

A hosted explainer can be linked from a pull request or security review without exposing the secret value or copying sensitive screenshots.

The unsafe path

A query parameter is easy to implement but hard to contain. It can persist in browser history and leak to unrelated systems through logs or outgoing links.

The safer delivery

A short-lived signed HttpOnly cookie lets the dashboard render the new key once after creation while keeping it out of URLs.

The review value

The explainer states the threat model, user flow, and retention boundary so reviewers can evaluate the behavior without seeing a real key.