
Whitelist Localhost: The Security Theater of OAuth Allowlists
Security isn’t about adding friction. It’s about addressing real attack vectors with targeted defenses.
6 min read

Some providers restrict OAuth redirect URIs to “secure” domains—then whitelist localhost
. That’s backwards. Localhost is the least secure environment to allow, while real production apps with HTTPS and monitoring get blocked.
Real security comes from PKCE, state parameter validation, HTTPS, exact URI matching, short-lived authorization codes—not arbitrary domain allowlists.
Ship OAuth flows that are secure in practice, not just in theory. Read more on Needle.