Why OneGround Uses an OAuth2 Token Endpoint
We have previously published an article on JWT best practices, which outlines the standards for creating secure and reliable JSON Web Tokens. It covers essential practices like using proper claims (iss, exp), managing secrets securely, and keeping tokens short-lived.
This raises an important question: Who is responsible for implementing these security rules?
In some API designs, customers are asked to generate their own JWTs. The approach is seemingly straightforward: "Here is a secret key. Please create a JWT according to our guidelines, sign it, and include it in your Authorization header."
However, this model shifts the complex and critical responsibility of security onto you, the customer. At OneGround, we believe that security should be a shared responsibility, but the burden of token creation should lie with the API provider. This is why we use a standard OAuth2 Token Endpoint, which allows you to request a token from us instead of creating one yourself.
This article explains why our approach is more secure, reliable, and ultimately simpler for you.
