Skip to content

Commit 1dbb740

Browse files
committed
Remove checkbox for Signed Requests
1 parent 84d0732 commit 1dbb740

File tree

1 file changed

+18
-27
lines changed

1 file changed

+18
-27
lines changed

app/forms/idp/create.tsx

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { useNavigate } from 'react-router-dom'
1010

1111
import { useApiMutation, useApiQueryClient } from '@oxide/api'
1212

13-
import { CheckboxField } from '~/components/form/fields/CheckboxField'
1413
import { DescriptionField } from '~/components/form/fields/DescriptionField'
1514
import { FileField } from '~/components/form/fields/FileField'
1615
import { NameField } from '~/components/form/fields/NameField'
@@ -62,8 +61,6 @@ export function CreateIdpSideModalForm() {
6261
})
6362

6463
const form = useForm({ defaultValues })
65-
const signedRequestsForm = useForm({ defaultValues: { signedRequests: false } })
66-
const signedRequests = signedRequestsForm.watch('signedRequests')
6764

6865
return (
6966
<SideModalForm
@@ -144,30 +141,24 @@ export function CreateIdpSideModalForm() {
144141
required
145142
control={form.control}
146143
/>
147-
<CheckboxField name="signedRequests" control={signedRequestsForm.control}>
148-
Signed requests (optional)
149-
</CheckboxField>
150-
{signedRequests && (
151-
<>
152-
{/* We don't bother validating that you have both of these or neither even
153-
though the API requires that because we are going to change the API to
154-
always require both, at which point these become simple `required` fields */}
155-
<FileField
156-
id="public-cert-file-input"
157-
name="signingKeypair.publicCert"
158-
description="DER-encoded X.509 certificate"
159-
label="Public cert"
160-
control={form.control}
161-
/>
162-
<FileField
163-
id="private-key-file-input"
164-
name="signingKeypair.privateKey"
165-
description="DER-encoded private key"
166-
label="Private key"
167-
control={form.control}
168-
/>
169-
</>
170-
)}
144+
145+
{/* We don't bother validating that you have both of these or neither even
146+
though the API requires that because we are going to change the API to
147+
always require both, at which point these become simple `required` fields */}
148+
<FileField
149+
id="public-cert-file-input"
150+
name="signingKeypair.publicCert"
151+
description="DER-encoded X.509 certificate"
152+
label="Public cert"
153+
control={form.control}
154+
/>
155+
<FileField
156+
id="private-key-file-input"
157+
name="signingKeypair.privateKey"
158+
description="DER-encoded private key"
159+
label="Private key"
160+
control={form.control}
161+
/>
171162

172163
<FormDivider />
173164

0 commit comments

Comments
 (0)