fix: pkce validation error (#2075)

- pkce is now `false` by default to prevent save errors
This commit is contained in:
Timon 2024-04-15 11:50:26 +02:00 committed by GitHub
parent eddac73341
commit 23674fffbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,7 +165,7 @@ const oauth2Schema = Yup.object({
}), }),
pkce: Yup.boolean().when('grantType', { pkce: Yup.boolean().when('grantType', {
is: (val) => ['authorization_code'].includes(val), is: (val) => ['authorization_code'].includes(val),
then: Yup.boolean().defined(), then: Yup.boolean().default(false),
otherwise: Yup.boolean() otherwise: Yup.boolean()
}) })
}) })