diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/oauth.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/oauth.ts index 5c2277278bb13..a87d22b6b047a 100644 --- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/oauth.ts +++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/oauth.ts @@ -26,7 +26,7 @@ export function registerOAuthAuthorizeRoute({ response_mode: schema.maybe(schema.string()), redirect_uri: schema.maybe(schema.string()), scope: schema.maybe(schema.string()), - state: schema.maybe(schema.string()), + state: schema.nullable(schema.string()), }), }, }, @@ -49,7 +49,7 @@ export function registerOAuthAuthorizeAcceptRoute({ response_type: schema.string(), redirect_uri: schema.maybe(schema.string()), scope: schema.maybe(schema.string()), - state: schema.maybe(schema.string()), + state: schema.nullable(schema.string()), }), }, }, @@ -72,7 +72,7 @@ export function registerOAuthAuthorizeDenyRoute({ response_type: schema.string(), redirect_uri: schema.maybe(schema.string()), scope: schema.maybe(schema.string()), - state: schema.maybe(schema.string()), + state: schema.nullable(schema.string()), }), }, },