Search code examples
oauth-2.0

What is the case for using OAuth2 Authorization Code WITHOUT PKCE


OAuth2 Auth Code with PKCE is a protocol that may be used for SPAs, web apps, web APIs. I wonder, is there any case where the "classic" Auth Code (without PKCE) should be used? From my understanding, PKCE extension is an evolution of the Auth Code flow, and it can completely replace the "classic" one.


Solution

  • One reason NOT to use OAuth2 authorization_code WITH PKCE is that, currently (Dec 2020), there are Authorization Servers that don't support it as well as Client libraries that don't support it. As a result, and depending on the libraries and servers you use, you may be unable to use it. However, if you can use it, whether for public or confidential clients, best-practice says that you should (see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-16#section-2.1.1)