Skip to content

Commit 088a6ed

Browse files
[Fundamentals] Document optional OAuth scopes (#32557)
* [Fundamentals] Document optional OAuth scopes * [Fundamentals] Add documentation for the bulk selection buttons when authorizing an OAuth application * update changelog * updating styling for bulleted items * fix file name date --------- Co-authored-by: Adam Bouhmad <adbouhmad@gmail.com>
1 parent 79ec383 commit 088a6ed

3 files changed

Lines changed: 53 additions & 10 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Optional OAuth scopes
3+
description: OAuth clients can now mark scopes as required or optional
4+
products:
5+
- fundamentals
6+
date: 2026-08-20
7+
---
8+
9+
We're announcing the GA of Optional OAuth Scopes.
10+
11+
OAuth client developers can now classify configured scopes as required or optional in the Cloudflare dashboard. By default, all configured scopes remain required .
12+
13+
## What's New
14+
15+
**Optional Scopes:** OAuth clients can now mark configured scopes as optional, allowing applications to request them without requiring users to approve them.
16+
17+
**Scope Selection:** On the consent screen, users must grant required scopes but can decline optional scopes. This helps customers apply least-privilege access to applications, CLIs, and workloads. Optional scopes are selected by default.
18+
19+
**Templates:** The consent screen now includes **Read Only** and **Full Access** templates to make scope selection faster and easier.
20+
21+
**Search:** Users can now search scopes in the consent screen.
22+
23+
Learn how to [select client scopes](/fundamentals/oauth/create-an-oauth-client/#select-scopes) and [edit optional permissions](/fundamentals/oauth/authorizing-an-application/#edit-optional-permissions).

src/content/docs/fundamentals/oauth/authorizing-an-application.mdx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ products:
99
- oauth
1010
---
1111

12-
import { DashButton } from "~/components";
12+
import { DashButton, Steps } from "~/components";
1313

1414
## Overview
1515

@@ -22,7 +22,7 @@ When a third-party application requests access to your Cloudflare account, you w
2222
- **Application name and logo**: The name and branding of the requesting application
2323
- **Publisher domain**: The domain and verification status of the application publisher
2424
- **Account selection**: Choose which Cloudflare account(s) the application can access
25-
- **Requested permissions**: After selecting the account(s) the application may access, the specific scopes the application is requesting will be displayed before consent is complete. To finish the authorization process, review the permissions the application is requesting and click**Authorize**
25+
- **Requested permissions**: After selecting the account(s) the application may access, the specific scopes the application is requesting will be displayed before consent is complete. You can also decline optional permissions. To finish the authorization process, review the permissions the application is requesting and select**Authorize**
2626

2727
Each shield icon indicates who owns the application and whether its domain ownership is verified:
2828

@@ -32,14 +32,26 @@ Each shield icon indicates who owns the application and whether its domain owner
3232

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

35+
### Edit optional permissions
36+
37+
All requested permissions are selected by default. You can turn off optional permissions, but required permissions remain selected. Select **Read only** to include only optional scopes with read access, or **Full access** to include all optional scopes. If the client has no permissions configured as optional, editing controls do not appear.
38+
39+
<Steps>
40+
1. In **Additional access**, select **Edit Permissions**.
41+
2. Turn permissions on or off individually or by category.
42+
3. Select **Authorize** to grant required and selected optional permissions.
43+
</Steps>
44+
3545
## View and revoke authorized applications
3646

3747
Application authorizations may be viewed and revoked at any time from the profile page on the Cloudflare dashboard.
3848

39-
1. Log in to the Cloudflare dashboard.
40-
2. <DashButton url="/?to=/profile/access-management/authorization" />
41-
3. View the list of applications you have authorized.
42-
- If you wish to revoke access to an application, click the “Revoke” button for that row
49+
<Steps>
50+
1. Log in to the Cloudflare dashboard.
51+
2. <DashButton url="/?to=/profile/access-management/authorization" />
52+
3. View the list of applications you have authorized.
53+
- If you wish to revoke access to an application, select the “Revoke” button for that row
54+
</Steps>
4355

4456
## Account administrator controls
4557

src/content/docs/fundamentals/oauth/create-an-oauth-client.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ To create an OAuth client, you must have one of these roles for the associated a
3030
- Redirect URLs
3131
6. Optional: Add non-required fields.
3232
7. Select **Continue** and define the scopes required for your client.
33-
8. Select **Create client**.
34-
9. Save your **Client ID** and **Client Secret** in a secure location.
33+
8. Optional: In **Choose optional scopes**, turn off **Required** for each scope you want to make optional. All scopes are required by default.
34+
9. Select **Create client**.
35+
10. Save your **Client ID** and **Client Secret** in a secure location.
3536
</Steps>
3637

3738
<DashButton url="/?to=/:account/oauth-clients" />
@@ -47,7 +48,8 @@ To create an OAuth client, you must have one of these roles for the associated a
4748
"client_name": "Cloudflare OAuth Client",
4849
"grant_types": ["authorization_code"],
4950
"redirect_uris": ["https://example.com/oauth/callback"],
50-
"scopes": ["workers-platform.read"],
51+
"scopes": ["workers-platform.read", "workers-platform.write"],
52+
"optional_scopes": ["workers-platform.read"],
5153
"post_logout_redirect_uris": ["https://example.com/logout"],
5254
"response_types": ["code"],
5355
"token_endpoint_auth_method": "client_secret_basic",
@@ -71,7 +73,11 @@ OAuth scope names correspond to Cloudflare API token permission names. Use the C
7173

7274
<Tabs syncKey="dashPlusAPI">
7375
<TabItem label="Dashboard">
74-
When you create or edit an OAuth client, all available scopes are displayed. Search for and select the scopes required for your client.
76+
When you create or edit an OAuth client, select at least one scope. All selected scopes are required by default.
77+
78+
In **Choose optional scopes**, turn off **Required** for each scope you want to make optional.
79+
80+
Required scopes must be granted on the consent screen, while optional scopes can be declined by the user.
7581
</TabItem>
7682
<TabItem label="API">
7783
Fetch the available scopes from the API. Use the scope ID when you create a client through the API.
@@ -81,6 +87,8 @@ OAuth scope names correspond to Cloudflare API token permission names. Use the C
8187
-H "Content-Type: application/json" \
8288
-H "Authorization: Bearer $API_TOKEN"
8389
```
90+
91+
To mark scopes as optional, include them in the `optional_scopes` of the request. This must be a subset of the `scopes` for the client. Optional scopes may be declined by the user during authorization.
8492
</TabItem>
8593
</Tabs>
8694

0 commit comments

Comments
 (0)