Auth & Webhooks
Know who's calling and what they may do, then call them back without losing an event.
5 lessons · ~51 min
By the end you can
- Choose sessions or signed tokens from the revocation deadline, and size the store either way
- Walk through OAuth's authorization code flow with PKCE, and tell an access token from an ID token
- Model sharing as relation tuples and run each permission check where the object lives
- Deliver webhooks that survive dead endpoints: an outbox, backoff, signatures and a queue per endpoint
- Spot the auth and webhook cues in a prompt and secure a design out loud
Lessons
- 1Sessions or signed tokens10 minA lookup per request against a signature check, what logout can't reach, and API keys for servers.
- 2OAuth, one redirect at a time11 minThe authorization code flow with PKCE, scopes and refresh tokens, and the ID token sign-in adds.
- 3Who may do what10 minRoles against relation tuples, the check that belongs to the object's service, and the stale yes.
- 4Webhooks you can trust11 minAn outbox, retries with backoff, a queue per endpoint, signed payloads, and receivers that dedupe.
- 5Securing a design out loud9 minThe cues in a prompt, where each piece lives, and the revocation number that flips the choice.
Design with it after
The design library has full system design prompts on a whiteboard canvas with AI feedback. Every one of them gives you a place to apply this.
Open the design library