Identify the four roles
OAuth 2.0 is a framework for granting a client access to protected resources. Distinguish the resource owner, the client, the authorization server and the resource server. A photo-printing service can receive limited access to stored photographs without receiving the user’s storage-service password. However, possession of an access token does not by itself define a complete login identity contract for the client. Ask which resource and operations the grant permits, who issued it, and which server must enforce it. Delegation is more specific than simply saying that a user logged in.
Trace the authorization-code flow
In an authorization-code flow, the user interacts with the authorization server and the client receives a code through the redirect. The client exchanges that code at the token endpoint for credentials used to access the resource. PKCE binds the exchange to a value prepared when the flow started: the authorization request carries a challenge, and the exchange supplies the corresponding verifier. Someone who intercepts only the code should not thereby obtain the same exchange capability. The code and access token have different recipients, lifetimes and purposes; neither should be treated as interchangeable application text.
Constrain the delegated power
A photo viewer that only reads images does not need deletion or account-administration privileges. The resource server must evaluate the token’s intended use, validity and allowed operations rather than accepting any nonempty string. OAuth does not require every access token to be a JWT, and decoding a token is not equivalent to validating permission. A secret embedded in a distributed public client also cannot be treated like a server-held confidential credential. Design the client authentication and token-handling assumptions around the deployment model, not around a field named client_secret.
Security requires the surrounding checks
Use current OAuth security guidance alongside the original framework, including strict redirect handling and defenses against code injection and token leakage. HTTPS does not stop a token from leaking through application logs or careless storage. Scope checks also do not automatically replace object-level authorization over individual records. The server must still decide whether this principal can perform this operation on this object. When a client needs a standardized identity assertion for sign-in, examine OpenID Connect rather than inventing identity semantics from whichever access-token fields happen to be available. Use transaction-specific PKCE values and current S256 requirements so the challenge method does not reveal the verifier in the authorization request.