You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`None` (default): DCR clients use registered redirect URIs, with loopback
197
-
ports allowed to vary for MCP compatibility
197
+
ports allowed to vary for MCP compatibility. Unsafe browser schemes such as
198
+
`javascript:`, `data:`, `file:`, and `vbscript:` are rejected.
198
199
- Empty list `[]`: No redirect URIs allowed
199
200
- Custom list: Only matching patterns allowed
200
201
@@ -559,7 +560,7 @@ auth = OAuthProxy(
559
560
560
561
### Redirect URI Validation
561
562
562
-
By default, the OAuth proxy validates DCR clients against their registered redirect URIs while allowing loopback ports to vary for MCP compatibility. You can restrict which clients can connect at the server level by specifying allowed patterns:
563
+
By default, the OAuth proxy validates DCR clients against their registered redirect URIs while allowing loopback ports to vary for MCP compatibility. Unsafe browser schemes such as `javascript:` are always rejected. You can restrict which clients can connect at the server level by specifying allowed patterns:
563
564
564
565
```python
565
566
# Allow only localhost clients (common for development)
List of allowed redirect URI patterns for MCP clients. Patterns support wildcards (e.g., `"http://localhost:*"`, `"https://*.example.com/*"`).
127
-
-`None` (default): DCR clients use registered redirect URIs, with loopback ports allowed to vary for MCP compatibility
127
+
-`None` (default): DCR clients use registered redirect URIs, with loopback ports allowed to vary for MCP compatibility. Unsafe browser schemes such as `javascript:`, `data:`, `file:`, and `vbscript:` are rejected.
@@ -218,7 +218,7 @@ WorkOS's support for Dynamic Client Registration makes it particularly well-suit
218
218
<Note>
219
219
`RemoteAuthProvider` also supports the `allowed_client_redirect_uris` parameter for controlling which redirect URIs are accepted from MCP clients during DCR:
220
220
221
-
-`None` (default): All redirect URIs allowed (for DCR compatibility)
221
+
-`None` (default): Broad DCR-compatible redirect support, while rejecting unsafe browser schemes such as `javascript:`, `data:`, `file:`, and `vbscript:`
222
222
- Custom list: Specify allowed patterns with wildcard support
223
223
- Empty list `[]`: No redirect URIs allowed
224
224
@@ -237,4 +237,4 @@ Remote OAuth integration requires careful attention to several technical details
237
237
238
238
**Scope Management**: Map token scopes to your application's permission model consistently. Consider how scope changes affect existing tokens and plan for smooth permission updates.
239
239
240
-
The complexity of these considerations reinforces why external identity providers are recommended over custom OAuth implementations. Established providers handle these technical details with extensive testing and operational experience.
240
+
The complexity of these considerations reinforces why external identity providers are recommended over custom OAuth implementations. Established providers handle these technical details with extensive testing and operational experience.
0 commit comments