The ToolSura OAuth Demo Playground walks an OAuth 2.0 authorization code exchange with PKCE. You supply the authorization, token and callback endpoints, follow the redirects, and read each response in your browser. Verifier creation and response inspection happen locally, so the values you type are handled on your own machine rather than posted to a ToolSura backend.
That scope has a limit worth stating plainly. A real OAuth handshake is network traffic: the browser is redirected to the authorization server you configure, and the client posts the authorization code to that provider's token endpoint. Those requests carry the client ID, redirect URI, code and tokens to the endpoints you enter. The page also loads third-party scripts, including a Cloudflare Insights analytics script and a Google Tag Manager preconnect, so loading it makes requests beyond ToolSura. Use sandbox credentials, never a production secret.
How the authorization code flow works, step by step
The framework behind every step is RFC 6749, the OAuth 2.0 Authorization Framework, published in October 2012 as a Standards Track Proposed Standard. Its section 4.1 defines the authorization code grant, and the playground makes each hop observable rather than theoretical.
- Build the authorization request. The client sends the user's browser to the authorization endpoint with its
client_id, the requestedscope, a localstatevalue and theredirect_uri. With PKCE, it also attaches acode_challengeand the method used to derive it. - The provider authenticates the owner. At the authorization endpoint, the resource owner signs in and decides whether to grant the requested scope. The client never sees the owner's password.
- The callback returns a code. The server redirects the browser back to the registered
redirect_uricarrying a short-lived authorization code and the unchangedstatevalue, which the client checks against the request it started. - Exchange the code at the token endpoint. The client POSTs the code, its own authentication and the same
redirect_urito the token endpoint. With PKCE it also sends the originalcode_verifierfor the server to compare. - Read the token response. The server validates everything and returns an access token plus an optional refresh token. Expiry windows and error bodies are part of what you inspect.
The state value in steps 1 and 3 is not decoration. RFC 6749 includes local state in its step A description so the client can bind the callback to the request it started; generate a unique, unpredictable value on each attempt and reject a callback whose state does not match. A public client has no secret to authenticate with at the token endpoint, which is why the verifier carries the proof in step 4. Confidential clients authenticate with a client secret, but a browser-based debugger belongs in the public category.
The verifier's route is specific and often misstated. Section 4.3 of RFC 7636, Proof Key for Code Exchange by OAuth Public Clients sends the challenge in the authorization request; section 4.5 sends the verifier to the token endpoint. The verifier does travel over the network, once, at the exchange step. Saying it never does is wrong.
What the playground actually shows
The tool is built around bring-your-own-provider testing. Its own copy describes full Proof Key for Code Exchange support, generation of verifier and challenge pairs, and side-by-side display of access, refresh and ID token responses with expiry and error detail. It accepts custom authorization, token and callback URLs, so nothing about a particular vendor is hardcoded.
Treat those descriptions as the operator's account of the tool, not as independently measured behaviour. The cached page HTML contains no form, iframe or scripted request that could be inspected, so the running widget could not be observed at the network level. What can be stated is the protocol: RFC 6749 section 4.1 requires the redirect and the code-for-token POST to reach whichever endpoints you configure. A sandbox tenant and a throwaway client registration are the right inputs.
Two framing choices follow from that. A simulator that invents its own authorization server teaches the sequence without touching a real provider, which helps when you are learning the steps. A bring-your-own-provider tool exercises the vendor's actual error bodies, redirect handling and token lifetime settings. Mixing the two up leads people to expect a simulator's tidy responses from a production identity provider, then to distrust the debugger when the real thing answers differently.
PKCE: a code verifier is not a code challenge
PKCE exists because of the authorization code interception attack described in RFC 7636. A hostile app on the same device can observe the callback and steal the code before the legitimate client redeems it. The countermeasure is a proof-of-possession pair.
The code_verifier is a high-entropy secret of 43 to 128 unreserved characters, with 32 octets yielding 256 bits recommended. The code_challenge is its transform: either plain, which is identical to the verifier, or S256, computed as base64url of the SHA-256 digest of the ASCII verifier. A client capable of S256 must use it, and servers must implement S256 as mandatory to implement. Section 4.6 returns invalid_grant on a failed comparison, and section 7.2 forbids downgrading to plain after trying S256.
For native applications, RFC 8252, OAuth 2.0 for Native Apps is explicit: public native app clients must implement PKCE, authorization servers must support it for them, and embedded user agents are ruled out in section 8.12. Its section 8.2 advises against the implicit flow because PKCE cannot protect it. Generate the pair with the PKCE verifier and challenge generator, and work through the transform by hand with the base64 and base64url encoder-decoder.
OAuth is not authentication
This is the myth that causes the most damage in a debugger. OAuth 2.0 is an authorization framework: it answers what a client may access, not who the user is. OpenID Connect Core 1.0 incorporating errata set 2 says in its section 1 that without profiling OAuth 2.0, the protocol is incapable of providing information about the authentication of an End-User. The OAuth 2.1 draft states it outright: OAuth is an authorization protocol, not an authentication protocol.
OpenID Connect supplies the missing identity layer on top. It is not a replacement for OAuth, and it does not turn an access token into a login proof. The conceptual argument, including where the openid scope fits, is covered in OAuth vs OpenID Connect: which one does what. This page keeps the boundary short on purpose: when you read a response in the playground, ask which layer produced each value.
An access token is not an ID token
The live page says "identity token"; the specification term is ID token. RFC 6749 section 1.4 defines the access token as a string denoting a specific scope, lifetime and other access attributes, usually an opaque credential the client carries to a protected resource. Section 1.5 adds that refresh tokens are used only with authorization servers and are never sent to resource servers.
OpenID Connect Core section 2 defines the ID token differently: a JWS-signed JWT whose required claims include iss, sub, aud, exp and iat, with nonce used for replay mitigation. Section 3.1.2.1 requires the openid scope value, or behaviour is unspecified. You only receive an ID token when you ask for it. Inspect one with the JWT decoder for ID tokens, remembering that decoding shows claims while signature validation remains a server-side job.
The OAuth 2.1 draft is -17, and still a work in progress
The current artifact is not a finished RFC. draft-ietf-oauth-v2-1-17 was published on 31 October 2026, lists Hardt, Parecki (editor) and Lodderstedt as authors, and expires on 4 May 2027. Its header says it obsoletes RFC 6749 and RFC 6750 only if approved. That conditional is the reason to label it a work in progress in any write-up.
Earlier copy on this page called the draft a March 2026 revision 15 with an expected IESG date before the end of 2026. That is stale. The draft's section 1 consolidates RFC 8252, RFC 9700 and RFC 10017; section 1.3 keeps three grant types, namely authorization code, refresh token and client credentials; section 10.1 removes the implicit grant. Read it as the direction of travel, not as settled law you can enforce against a provider today.
Why redirect_uri mismatches refuse to be guessed
The most common playground failure is the callback rejection, and the rule behind it is deliberately strict. RFC 9700, Best Current Practice for OAuth 2.0 Security, published in January 2025 as BCP 240, requires exact string matching of redirect URIs in section 2.1 and again in section 4.1.3, with a narrow exception for localhost native-app ports. RFC 6749 section 3.1.2.3 covers registration of those URIs.
The fix therefore lives at the provider, not in the request. Copy the callback URL character for character into the client's allowlist, including scheme, host, path and any trailing slash. A mismatch is not a hint about a hidden client-side setting; it is a registration mismatch, and no amount of parameter reshuffling in the debugger will soften it.
Bearer tokens and what you copy out of a response
Access tokens travel under the bearer model in RFC 6750, Bearer Token Usage, which defines the Authorization header form and expects TLS for requests carrying them. RFC 9700 section 4.3.2 cites section 2.3 of that document when stating that clients must not pass access tokens in a URI query parameter.
Section 4.2.4 of RFC 9700 recommends suppressing the Referer header, for example with Referrer-Policy: no-referrer, because codes and state can leak through it. MDN's Referer header reference notes that the header may carry an origin, path and query string, and records the privacy concerns that motivate that advice. A token shown in a response is live until it expires or is revoked. Paste it into a decoder if useful, but keep it out of shared documents, screenshots and issue trackers.
The older threat model still applies
RFC 6819, the OAuth 2.0 Threat Model and Security Considerations remains the reference point. Section 7.4 of RFC 7636 says all of its analysis applies and readers should follow it; sections 8.1 and 8.5 of RFC 8252 build on its code-interception and client-authentication discussion.
RFC 9700 turns that analysis into current requirements. Section 2.1.1 says public clients must use PKCE and authorization servers must support it and enforce the verifier, with S256 currently the only method that does not expose the verifier in the authorization request. Section 2.1.2 says the implicit grant should not be used, and section 2.4 says the resource owner password credentials grant must not be used. Those are the checks worth applying to whatever the playground shows you.
Related tools and further reading
Keep the next step close to the flow you just ran:
- The security tools index groups this page with the rest of the security cluster.
- The PKCE verifier and challenge generator produces the pair the exchange checks.
- The JWT decoder for inspecting ID tokens opens the signed JWT an OIDC provider returns.
- The base64 and base64url encoder-decoder lets you reproduce the S256 transform manually.
For the conceptual case, read OAuth vs OpenID Connect: which one does what. The specification trail starts with RFC 6749, moves to RFC 7636 for PKCE, then RFC 9700 for the security checklist.
