opyebOAuthLab
OPYEB · serverless static tool

Check PKCE and your redirect URIs before you send a request

Generate a code_verifier, compute its S256 challenge instantly, and assemble state, nonce and an authorization URL. Paste the callback URL back in to decode code, state and error and compare state. Audit redirect URIs for open-redirect risks on the same screen.

One-line answer: OAuthLab is a free debugger that assembles and verifies OAuth 2.0 and OIDC requests locally, and nothing you type is sent anywhere.

  • 100%runs in your browser
  • S256SHA-256 · Base64URL
  • 6synthetic presets
  • 0input data uploads
    (excl. ad/affiliate widgets)

① PKCE generator and verifier

Create a code_verifier the RFC 7636 way, then compute the Base64URL SHA-256 challenge with the browser's Web Crypto. Verify that a verifier and challenge belong together.

Local only

The S256 challenge is Base64URL(SHA-256(verifier)) with the = padding removed. plain uses the verifier itself.

Pair verification

② state and nonce

Create a CSRF-preventing state and an OIDC replay-preventing nonce from cryptographic randomness. Use the same values when you check the callback.

③ Authorization URL builder

Enter the endpoint and parameters and the URL is assembled in your browser. No request is sent.

Zero-API
Synthetic presets

Built authorization URL

Do not click this URL. It would take you to a real authorization server and ask you to sign in. Copy it for review or use it only with a test client.

④ URL parser and callback check

Paste an authorization URL or callback URL to see its query parameters as a table. For a callback it extracts code, state, error and error_description and compares state with the expected value.

⑤ Redirect URI and OAuth security audit

Add the redirect_uri values you plan to register and your client settings. The audit reports open redirects, plain HTTP, implicit flow and missing state or PKCE item by item.

Local only

Run the audit and each finding will appear here.

⑥ Token exchange snippets

Generate code that calls the token endpoint with the values above. Fill in the client secret yourself before use. This page sends no requests.


  

The client secret is not included in the snippet. Load it from a server environment variable.

⑦ Export the report

Copy or download the audit as a Markdown table or JSON. Files are created in your browser and never uploaded.

Markdown preview


How it works

It follows the order set by RFC 7636 and RFC 6749, and every calculation finishes inside your browser.

Generate a verifiercrypto.getRandomValues() produces 32–96 random bytes, encoded into 43–128 characters from A-Z a-z 0-9 - . _ ~.
Compute the challengeTake SHA-256(verifier), encode it as Base64URL and drop the = padding. With S256 only this value travels to the authorization server.
Build and parseAppend client_id, redirect_uri, scope, state, nonce and code_challenge with URLSearchParams, and read a returned URL back with the same API.
Audit and exportInspect each redirect_uri with new URL() for host, path, query and fragment, then copy the findings as Markdown or JSON.

Frequently asked questions

Is my client_id or URL sent to a server?

No. This site has no server code, no API and no accounts. Every calculation runs in your browser with JavaScript and Web Crypto, and nothing is written to localStorage. Closing the page discards it. 0 input data uploads (excl. ad/affiliate widgets). Only the ad, affiliate and analytics widgets connect to external domains.

Why is PKCE necessary?

To stop authorization code interception. A public client cannot keep a client secret safe, so a stolen code could be exchanged for tokens. PKCE sends a challenge with the authorization request and the verifier with the token request, and the server issues tokens only when the two match.

How do S256 and plain differ?

S256 sends the Base64URL SHA-256 of the verifier; plain sends the verifier itself. With plain, anyone who sees the authorization request learns the verifier, so RFC 7636 makes S256 the default and tells servers that support it to reject plain. This tool computes both but warns about plain.

How is state different from nonce?

state is the client's CSRF value that proves a callback came from its own request. nonce is the OIDC value that proves an ID token was not replayed. Both should be fresh random values per request, stored in the session and compared on the callback.

The callback state does not match. What should I check?

Check that the callback state is exactly the value you sent (including whitespace and encoding), that the stored value was not overwritten, and that two logins did not run in the same tab. URLSearchParams decodes values automatically, so compare the decoded strings.

How should redirect_uri be registered?

The registered value and the request value must match exactly, character for character. Do not register wildcards, subdomain patterns or path traversal, which become open redirects. Web clients should use an absolute https URL; local development may use the http://127.0.0.1:port loopback exception.

Why is implicit flow (response_type=token) risky?

The access token returns in the URL fragment, where it can leak through history, referrers and scripts, and there is no token exchange step so PKCE cannot apply. OAuth 2.1 removes implicit; the current recommendation is response_type=code with PKCE.

Can I use this for mobile or desktop apps?

Yes. PKCE and URL assembly are platform independent. Native apps use custom schemes (app://callback) or loopback redirects, and you must confirm the authorization server allows them. This tool reports custom schemes as an informational item.

OAuth 2.0 and OIDC guides

PKCE calculation, redirect_uri registration rules, state and nonce, and token exchange, in practical order.