OAuth 2.0 vs OAuth 2.1: What changed, why it matters, and how to upgrade
Blog post from WorkOS
OAuth 2.1 is an updated version of the OAuth 2.0 standard, designed to enhance security by simplifying implementation and mandating best practices, while eliminating insecure options like the implicit and password grants. Although still in draft form as of April 2025, it is being adopted in production by leading organizations, such as Anthropic, which uses it in their Model Context Protocol for secure AI agent interactions. This iteration consolidates scattered guidance into a unified specification, making it easier for developers to implement OAuth securely in web apps, APIs, and beyond. Key changes include making Proof Key for Code Exchange (PKCE) mandatory for all authorization code flows, prohibiting the use of bearer tokens in URLs, requiring refresh token rotation or sender constraints, and enforcing exact redirect URI matching to prevent vulnerabilities. These enhancements reflect a decade of lessons learned, offering a more secure foundation for both human-driven applications and autonomous systems, with tools like WorkOS providing an out-of-the-box solution for seamless compliance.