Function
handleInputChange
(field: keyof typeof formData, value: string | boolean)
Source from the content-addressed store, hash-verified
| 365 | } |
| 366 | |
| 367 | const handleInputChange = (field: keyof typeof formData, value: string | boolean) => { |
| 368 | const next = { ...formData, [field]: value } |
| 369 | |
| 370 | if (field === 'providerType') { |
| 371 | setShowErrors(false) |
| 372 | } |
| 373 | |
| 374 | setFormData(next) |
| 375 | validateAll(next) |
| 376 | } |
| 377 | |
| 378 | const isSaml = formData.providerType === 'saml' |
| 379 | const callbackUrl = `${getBaseUrl()}/api/auth/${isSaml ? 'sso/saml2/callback' : 'sso/callback'}/${formData.providerId || existingProvider?.providerId || 'provider-id'}` |
Tested by
no test coverage detected