Commit 9f3448f
committed
fix: accept null introspection_endpoint in OAuthMetadataSchema
Some OAuth authorization servers (e.g. Dotdigital's MCP server) return
introspection_endpoint: null in their .well-known/oauth-authorization-server
metadata rather than omitting the field entirely.
The current schema uses z.string().optional() which accepts undefined but
rejects null, causing OAuth flow initiation to fail with:
"Invalid input: expected string, received null"
Changing to z.string().nullish() accepts both undefined and null, which
aligns with RFC 7662 where introspection_endpoint is optional and a server
returning null should be treated the same as not including it.1 parent b8886e7 commit 9f3448f
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments