Skip to content

Commit 1984413

Browse files
feat: Enhance OpenAPI documentation by adding required field formatting and providing a description for the bearerAuth security scheme. (#1004)
* feat: Enhance OpenAPI documentation by adding required field formatting and providing a description for the bearerAuth security scheme. * Apply suggestion from @ethanpalm Co-authored-by: Ethan Palm <[email protected]> * Apply suggestion from @ethanpalm Co-authored-by: Ethan Palm <[email protected]> --------- Co-authored-by: Ethan Palm <[email protected]>
1 parent 93e6772 commit 1984413

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

authentication-personalization/authentication-setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Your documentation is hosted at `docs.foo.com` and your team uses the dashboard
103103
* **Authorization URL**: Your OAuth endpoint.
104104
* **Client ID**: Your OAuth 2.0 client identifier.
105105
* **Client Secret**: Your OAuth 2.0 client secret.
106-
* **Scopes**: Permissions to request. Use multiple scopes if you need different access levels.
106+
* **Scopes**: Permissions to request. Copy the **entire** scope string (for example, for a scope like `provider.users.docs`, copy the complete `provider.users.docs`). Use multiple scopes if you need different access levels.
107107
* **Token URL**: Your OAuth token exchange endpoint.
108108
* **Info API URL** (optional): Endpoint to retrieve user info for personalization. If omitted, the OAuth flow will only be used to verify identity and the user info will be empty.
109109
* **Logout URL**: The native logout URL for your OAuth provider. If your provider has a `returnTo` or similar parameter, point it back to your docs URL.
@@ -129,12 +129,12 @@ Your documentation is hosted at `foo.com/docs` and you have an existing OAuth se
129129
**Configure your OAuth server details** in your dashboard:
130130
- **Authorization URL**: `https://auth.foo.com/authorization`
131131
- **Client ID**: `ydybo4SD8PR73vzWWd6S0ObH`
132-
- **Scopes**: `['docs-user-info']`
132+
- **Scopes**: `['provider.users.docs']`
133133
- **Token URL**: `https://auth.foo.com/exchange`
134134
- **Info API URL**: `https://api.foo.com/docs/user-info`
135135
- **Logout URL**: `https://auth.foo.com/logout?returnTo=https%3A%2F%2Ffoo.com%2Fdocs`
136136

137-
**Create a user info endpoint** at `api.foo.com/docs/user-info`, which requires an OAuth access token with the `docs-user-info` scope, and returns:
137+
**Create a user info endpoint** at `api.foo.com/docs/user-info`, which requires an OAuth access token with the `provider.users.docs` scope, and returns:
138138

139139
```json
140140
{

authentication-personalization/personalization-setup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ To redirect users to specific sections after login, use this URL format: `https:
244244
3. Select **OAuth** and configure these fields:
245245
* **Authorization URL**: Your OAuth authorization endpoint.
246246
* **Client ID**: Your OAuth 2.0 client identifier.
247-
* **Scopes**: Permissions to request. Must match the scopes of the endpoint that you configured in the first step.
247+
* **Scopes**: Permissions to request. Copy the **entire** scope string (for example, for a scope like `provider.users.docs`, copy the complete `provider.users.docs`). Must match the scopes of the endpoint that you configured in the first step.
248248
* **Token URL**: Your OAuth token exchange endpoint.
249249
* **Info API URL**: Endpoint to retrieve user data for personalization. Created in the first step.
250250
4. Select **Save changes**
@@ -259,7 +259,7 @@ To redirect users to specific sections after login, use this URL format: `https:
259259
260260
Your documentation is hosted at `foo.com/docs` and you have an existing OAuth server that supports the PKCE flow. You want to personalize your docs based on user data.
261261
262-
**Create a user info endpoint** at `api.foo.com/docs/user-info`, which requires an OAuth access token with the `docs-user-info` scope and responds with the user's custom data:
262+
**Create a user info endpoint** at `api.foo.com/docs/user-info`, which requires an OAuth access token with the `provider.users.docs` scope and responds with the user's custom data:
263263

264264
```json
265265
{

0 commit comments

Comments
 (0)