Skip to content

Commit 4f7202d

Browse files
authored
feat: add nonConfidentialClient option to Dynamic Client Registration (#99)
* docs: update README to include steps for configuring Dynamic Client Registration * feat: add nonConfidentialClient option to Dynamic Client Registration and update registration handler * make lint happy
1 parent 96421c5 commit 4f7202d

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const provider = new DescopeMcpProvider({
178178
required: false,
179179
},
180180
],
181+
nonConfidentialClient: true, // Set to true for public clients (no client secret)
181182
},
182183
});
183184

examples/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ DESCOPE_PROJECT_ID=your_project_id_here
2020
SERVER_URL=http://localhost:3000
2121
```
2222

23+
### Configure Descope Project
24+
25+
Enable Dynamic Client Registration (DCR) and configure scopes:
26+
27+
1. Go to [Descope Console](https://app.descope.com/apps/inbound)
28+
2. Navigate to **Inbound App Settings**
29+
3. Enable **Dynamic client registration**
30+
2331
### 2. Run Example
2432

2533
```bash

src/handlers/register.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ async function registerClient(
109109
values: attributes,
110110
}),
111111
),
112+
nonConfidentialClient:
113+
provider.options.dynamicClientRegistrationOptions
114+
?.nonConfidentialClient === true,
112115
}),
113116
},
114117
);

src/schemas/options.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ export const DynamicClientRegistrationOptionsSchema = z.object({
6565

6666
/** Logo for the client */
6767
logo: z.string().optional(),
68+
69+
/** Whether the client is confidential */
70+
nonConfidentialClient: z.boolean().optional(),
6871
});
6972

7073
/**

0 commit comments

Comments
 (0)