Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

OAuth Third-Party Authorization, Consent Scopes, and Client Registration

How Cloudflare OAuth consent, optional scopes, account selection, revocation, and self-managed OAuth clients work for users and integrators.

This page summarizes Cloudflare documentation on OAuth 2.0 for third-party applications: what happens when you authorize an app, how optional OAuth scopes and consent shields work, how account administrators can restrict access, and how developers register OAuth clients (including Wrangler and the Cloudflare API MCP server).

OAuth on Cloudflare: what authorization grants

Section titled “OAuth on Cloudflare: what authorization grants”

OAuth lets a third-party application act on your behalf to reach specific Cloudflare resources without you handing over a long-lived API token. When you approve an app, you grant scoped access; Cloudflare documents tools to view, manage, and revoke those grants at any time.

When you authorize a third-party OAuth application, you grant it permission to access specific Cloudflare resources on your behalf. Cloudflare provides tools to view, manage, and revoke these authorizations at any time.

— Cloudflare, Authorizing an application

OAuth is available on Free, Pro, Business, and Enterprise plans. Self-managed OAuth enables developers to build integrations that use the same consent model as first-party tools such as Wrangler—for example, deploying Workers after consent.

OAuth lets third-party applications act on behalf of a user to access their Cloudflare account. For example, after a user grants consent, Wrangler can deploy Workers into that account.

— Cloudflare, Introducing self-managed OAuth clients

Section titled “Authorize a third-party OAuth application: consent screen and shields”

When an application requests access, Cloudflare shows a consent screen with the application name and logo, publisher domain and verification status, account selection, and requested permissions (scopes) before you select Authorize.

When a third-party application requests access to your Cloudflare account, you will see a consent screen that displays: Application name and logo … Publisher domain … Account selection … Requested permissions …

— Cloudflare, Authorizing an application

Section titled “Shield icons on the OAuth consent screen: who owns the app”

A shield icon under the consent title shows who owns the application and whether the publisher domain is verified:

Shield Meaning
Green filled shield Cloudflare owns and manages the application
Blue outlined shield Third-party app with verified domain ownership
Amber filled shield Third-party app without verified domain ownership

Domain verification only confirms that the application owner controls the displayed domain.

— Cloudflare, Improved publisher verification details on OAuth consent screens

Verified domain ownership is a trust signal; it does not replace reading the permission list.

Choose which Cloudflare accounts to authorize

Section titled “Choose which Cloudflare accounts to authorize”

You can grant access per account instead of all-or-nothing. Account checkboxes list which accounts the app may use; an All accounts option remains for trusted tools.

Account-by-account selection — Choose exactly which accounts the application can access. “All accounts” option — Still available for trusted tools like Wrangler.

— Cloudflare, Improved OAuth experience for consent and management

The consent screen also surfaces what the app can access, who created it, and which accounts you selected.

Section titled “Optional OAuth scopes: edit permissions on the consent screen”

Optional OAuth scopes let users grant only what they need (least privilege) while required scopes stay mandatory. By default, every scope configured on a client is required until the developer marks some as optional.

OAuth client developers can now classify configured scopes as required or optional in the Cloudflare dashboard. By default, all configured scopes remain required.

— Cloudflare, Optional OAuth scopes

On consent, users must accept required scopes; they may decline optional ones. Optional scopes are selected by default, so you should review them before authorizing. The UI adds Read only and Full access templates and search for scopes.

Wrangler and the Cloudflare API MCP server use optional scopes: if a command needs a scope you declined, sign in again and grant that scope.

Required scopes remain selected. Choosing fewer optional scopes limits each tool’s access to the permissions needed for your workflow. If a command or tool call needs a scope that you declined, reauthorize the client and grant that scope.

— Cloudflare, Choose OAuth scopes for Wrangler and the Cloudflare API MCP server

How to edit optional permissions before you authorize

Section titled “How to edit optional permissions before you authorize”
  1. On the consent screen, after choosing account(s), review the listed scopes.
  2. In Additional access, select Edit Permissions.
  3. Turn permissions on or off by category or individually; use Read only or Full access for optional scopes where shown.
  4. Required permissions stay selected; optional ones can be turned off.
  5. Select Authorize to grant required scopes plus the optional scopes you left enabled.

All requested permissions are selected by default. You can turn off optional permissions, but required permissions remain selected.

— Cloudflare, Authorizing an application

If the client has no optional permissions configured, edit controls do not appear.

View, revoke, and restrict OAuth application access

Section titled “View, revoke, and restrict OAuth application access”

Revoke authorized OAuth applications from your profile

Section titled “Revoke authorized OAuth applications from your profile”

Authorizations can be viewed and revoked from your Cloudflare profile (Manage OAuth authorizations on the dashboard profile flow, and Profile > Access Management > Connected Applications for connected apps).

If you wish to revoke access to an application, select the “Revoke” button for that row.

— Cloudflare, Authorizing an application

Revoke instantly — Remove access with one click when you no longer need it.

— Cloudflare, Improved OAuth experience for consent and management

Account administrator: disable Public OAuth App access

Section titled “Account administrator: disable Public OAuth App access”

If an account does not appear during consent, an administrator may have blocked OAuth apps from account resources under Manage Account > Members > Settings > Public OAuth App access.

This will not prevent existing authorizations account members may already have in place, and will only prevent new authorizations from accessing account resources.

— Cloudflare, Authorizing an application

Create an OAuth client: scopes, flows, and visibility

Section titled “Create an OAuth client: scopes, flows, and visibility”

Developers with Super Administrator, Administrator, or OAuth Client Write on an account can create clients under Manage Account > OAuth clients. See Create your OAuth client for dashboard and API steps.

Scope names align with Cloudflare API token permission names; pick only what the app needs. When creating or editing a client, turn off Required under Choose optional scopes for each scope users may decline. Via API, optional_scopes must be a subset of scopes.

Supported OAuth flows for Cloudflare third-party clients

Section titled “Supported OAuth flows for Cloudflare third-party clients”

Cloudflare OAuth clients support the Authorization Code flow only—not Client Credentials, Implicit, Resource Owner Password, or Device Authorization for third-party clients.

Client type Flow Token endpoint auth PKCE
Server-side web app or backend Authorization Code + client secret client_secret_basic or client_secret_post Optional
Browser, mobile, desktop, or CLI Authorization Code + PKCE none Required, S256

Never expose a client secret in client-side code or mobile binaries. PKCE clients do not need a client secret.

After creation, copy the client secret immediately if required—you cannot view it again later; use Rotate client secret if lost.

Private vs public OAuth clients and domain verification

Section titled “Private vs public OAuth clients and domain verification”

New clients default to private: only members of the account where the client was created can authorize. Public clients can be authorized by any Cloudflare user after prerequisites (name, logo, client URL, scopes, and domain verification for the client URL).

Public clients need a DNS TXT record containing the verification code (including the cloudflare_oauth_client_publisher= prefix). Cloudflare polls for up to two days. After verification, you cannot change the client URL’s domain (routes on that domain may still change).

Users then see a verified badge on the consent page when domain verification succeeds.

Integrate an OAuth client with Cloudflare endpoints

Section titled “Integrate an OAuth client with Cloudflare endpoints”

After registration, use Cloudflare’s documented endpoints (Integrate your OAuth client with Cloudflare):

Purpose Endpoint
JWKS https://dash.cloudflare.com/.well-known/jwks.json
OpenID configuration https://dash.cloudflare.com/.well-known/openid-configuration
Authorization https://dash.cloudflare.com/oauth2/auth
Token https://dash.cloudflare.com/oauth2/token
Revoke https://dash.cloudflare.com/oauth2/revoke
Session logout https://dash.cloudflare.com/oauth2/logout
User info https://dash.cloudflare.com/oauth2/userinfo

List available scope IDs with GET https://api.cloudflare.com/client/v4/oauth/scopes when automating client setup.

MCP authorization servers: when completeAuthorization() runs

Section titled “MCP authorization servers: when completeAuthorization() runs”

If you build an MCP authorization server on Cloudflare Agents, the /authorize page should call completeAuthorization() only after the user has signed in and approved the client. Helpers such as beginConsent(), approveConsent(), and denyConsent() implement a consent page designed not to be framed or forged. That pattern is separate from end-user consent on dash.cloudflare.com, but follows the same rule: finish authorization only after explicit approval.

Your /authorize page should call completeAuthorization() only after it has signed the user in and the user has approved the client.

— Cloudflare, Authorization

Section titled “Common mistakes with Cloudflare OAuth consent and clients”
  • Approving All accounts for an unfamiliar third-party app when per-account access is enough.
  • Ignoring amber shields and unverified publisher domains on high-privilege scopes.
  • Leaving all optional scopes enabled because they are selected by default.
  • Assuming Public OAuth App access off on an account revokes existing grants—it does not.
  • Promoting a client to public before DNS verification or without accepting permanent public visibility.
  • Embedding client secrets in CLIs or SPAs that should use PKCE instead.
  • Running Wrangler or MCP tools after declining a scope they need—reauthorize and grant that scope.
  1. Sign in to the Cloudflare dashboard and open Manage OAuth authorizations or Profile > Access Management > Connected Applications; confirm listed apps, accounts, and scopes match what you expect, using guidance from Authorizing an application and Improved OAuth experience for consent and management.
  2. Trigger a test authorization for a client you control and confirm the consent screen shows the correct shield, publisher domain, account checkboxes, and scope list per Improved publisher verification details on OAuth consent screens.
  3. Use Edit Permissions and confirm required scopes cannot be disabled while optional scopes can, as described in Optional OAuth scopes.
  4. If you operate an OAuth client, verify redirect URIs, flow (secret vs PKCE), and endpoints against Create your OAuth client and Integrate your OAuth client with Cloudflare.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.