Skip to content

Commit e95eaf9

Browse files
committed
Clean up, add a comment
1 parent f51dee9 commit e95eaf9

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-oidc.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,11 @@ function AuthenticationOIDC({
167167
onChange={({
168168
target: { checked },
169169
}: React.ChangeEvent<HTMLInputElement>) => {
170-
if (checked) {
171-
return handleFieldChanged(
172-
'skipNonceInAuthCodeRequest',
173-
undefined
174-
);
175-
}
176-
177-
return handleFieldChanged('skipNonceInAuthCodeRequest', true);
170+
// The value of the checkbox is inverse of the value of the oidc option.
171+
return handleFieldChanged(
172+
'skipNonceInAuthCodeRequest',
173+
checked ? undefined : true
174+
);
178175
}}
179176
data-testid="oidc-send-nonce-in-auth-code-request"
180177
id="oidc-send-nonce-in-auth-code-request"

0 commit comments

Comments
 (0)