The value of a standard is that two parties who have never spoken can interoperate. The cost is that neither of them can fix the other's interpretation of it.
This piece walks through how we think about it at Paycux, what we have changed our minds about, and where the sharp edges are.
OAuth 2.0 in one sentence
That brings us to oauth 2.0 in one sentence. Treat anything the other side sends as untrusted input until it has been through validation you wrote. Signature checks, issuer checks, audience checks and expiry checks are four separate decisions, and skipping any one of them is a real vulnerability rather than a theoretical one.
Treat anything the other side sends as untrusted input until it has been through validation you wrote. Signature checks, issuer checks, audience checks and expiry checks are four separate decisions, and skipping any one of them is a real vulnerability rather than a theoretical one.
A real-world example (the “calendar app” story)
That brings us to a real-world example (the “calendar app” story). Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
Normalization is the whole job. Two providers can be perfectly compliant and still disagree about what a group membership is, whether a logout is meaningful, and which attribute carries the email address.
- Validate signature, issuer, audience and expiry as four separate checks
- Normalize provider attributes into one internal shape
- Fail loudly when a peer stops meeting a documented assumption
- Keep a fixture per provider so regressions surface in CI
What OAuth 2.0 is (and isn’t)
That brings us to what oauth 2.0 is (and isn’t). Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
Normalization is the whole job. Two providers can be perfectly compliant and still disagree about what a group membership is, whether a logout is meaningful, and which attribute carries the email address.
What OAuth 2.0 is used for
That brings us to what oauth 2.0 is used for. Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
Normalization is the whole job.
The core idea: tokens instead of passwords
The core idea: tokens instead of passwords deserves its own treatment. Treat anything the other side sends as untrusted input until it has been through validation you wrote. Signature checks, issuer checks, audience checks and expiry checks are four separate decisions, and skipping any one of them is a real vulnerability rather than a theoretical one.
Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
OAuth roles explained (with a quick mental model)
Consider oauth roles explained (with a quick mental model). Version the assumption, not just the code. Write down what you expect from the peer, and make the failure loud when it stops being true, because the alternative is a connection that half works for six weeks.
Treat anything the other side sends as untrusted input until it has been through validation you wrote. Signature checks, issuer checks, audience checks and expiry checks are four separate decisions, and skipping any one of them is a real vulnerability rather than a theoretical one.
The main OAuth 2.0 grants (flows)
That brings us to the main oauth 2.0 grants (flows). Normalization is the whole job. Two providers can be perfectly compliant and still disagree about what a group membership is, whether a logout is meaningful, and which attribute carries the email address.
Normalization is the whole job. Two providers can be perfectly compliant and still disagree about what a group membership is, whether a logout is meaningful, and which attribute carries the email address.
Where this leaves us
If there is one thing worth taking away, it is that the expensive decisions are the ones made implicitly. Making them on purpose costs an afternoon.
If you are working through the same problem and want to compare notes, the docs cover the mechanics and the console shows the behaviour on your own data.
Everything here, already built
Sign-in, enterprise SSO, directory provisioning, roles and an audit trail behind one API. Start with the quickstart and have a working sign-in this afternoon.