What is OAuth 2.0?

OAuth 2.0 is an industry-standard authorization framework enabling third-party applications to obtain limited access to user accounts without exposing user credentials.

How it works

OAuth 2.0 defines authorization flows including Authorization Code flow with PKCE, Client Credentials, and Implicit (deprecated) flows. OpenAPI 3.0 supports oauth2 security schemes with authorizationUrl and tokenUrl.

Common mistakes

  • Using Implicit flow in modern applications
  • Not specifying scopes in OpenAPI security declarations