1001Ferramentas
🔑Validators

client_id / client_secret Validator

Validate the format of an OAuth client_id and client_secret, checking valid characters and minimum length. Useful for debugging auth integrations and APIs.

Analysis

Checking the format of client_id and client_secret

The OAuth 2.0 client credential pair has no format defined by the specification: each provider picks its own. That means no universal validation exists — but there are characteristics separating a healthy credential from one that will cause trouble, and those are what you can check before pasting them into a configuration file.

Paste both values and the page flags what stands out: an identifier that is too short, a secret below the length expected of a value with reasonable entropy, and characters outside the URL-safe set. That last one matters because credentials may travel encoded in the authorisation header or in a form body, and a character needing escapes is a recurring source of intermittent failure.

Be clear about what the check does not do: it measures shape, not secrecy. A long, well-formatted secret can be weak for having been generated from a predictable source, and no inspection of the value reveals that. Real security comes from the provider generating it with a cryptographic source, from the secret never reaching a repository or a browser, and from rotating it periodically.

Frequently asked questions

Can a single-page application have a secret?
It cannot, because there is nowhere to keep it: anything reaching the browser is readable by whoever opens the developer tools. For that case the correct flow is the authorisation code flow with the proof key extension, which needs no secret. Mobile applications are in the same position.
What secret length is reasonable?
What matters is entropy rather than character count, but since you cannot measure entropy by looking at a value, length serves as a rough indicator. Serious providers issue values long enough to make brute force impractical — and the issued value must not be truncated when stored.
Where should the secret live?
In a secrets manager or an environment variable injected at runtime, never in the repository and never in a versioned configuration file. If it was ever committed, treat it as leaked and rotate: deleting the file does not erase the Git history.

Related Tools