Why You Should Migrate to OAuth 2.0 From API Keys

This page summarizes the projects mentioned and recommended in the original post on /r/programming

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • oauth2-proxy

    A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.

  • There's also other problems you might run into when using JWT: - First using scopes for permissions like Slack does can generate a token so large that a server might refuse it (One of many examples: https://github.com/oauth2-proxy/oauth2-proxy/issues/644, any rational server won't allow unlimited sized header), in my company they did this with the convention of read:team:product:resource but if you're an admin and have every rights by default, then you can't use the generated token by default as it will be too large. I think Quarkus works that way and you might encounter some problems with you don't configure it correctly. - Second is that it will cost a lot of bandwidth to send this header each time you're doing something, and probably won't be the perfect answer for what you want to do (do you really have third parties calling your API ?) - Third is about security concerns, you might say that having your permissions in a token is not as bad as you might think but in case of a Man In The Middle attack, you could leak information about your company, process or business intelligence that could have been prevented. - Fourth and that'll be the last, is that you can't revoke a JWT. And if you say you can, then you don't need a JWT at the first time because it would defeat the principle of a self contained JWT.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts