Skip to content

Commit 716f49b

Browse files
committed
fix: move OAuth2 expiry field next to scopes
1 parent e43a783 commit 716f49b

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,21 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
683683
isRequired: false,
684684
})}
685685
</FormInputContainer>
686+
{_.get(formData.authentication, "grantType") ===
687+
GrantType.AuthorizationCode && (
688+
<FormInputContainer
689+
data-location-id={btoa("authentication.expiresIn")}
690+
>
691+
{this.renderInputTextControlViaFormControl({
692+
configProperty: "authentication.expiresIn",
693+
label: "Authorization expires in (seconds)",
694+
placeholderText: "3600",
695+
dataType: "NUMBER",
696+
encrypted: false,
697+
isRequired: false,
698+
})}
699+
</FormInputContainer>
700+
)}
686701
<FormInputContainer
687702
data-location-id={btoa("authentication.isAuthorizationHeader")}
688703
>
@@ -870,17 +885,6 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
870885
false,
871886
)}
872887
</FormInputContainer>
873-
<FormInputContainer data-location-id={btoa("authentication.expiresIn")}>
874-
{this.renderInputTextControlViaFormControl({
875-
configProperty: "authentication.expiresIn",
876-
label: "Authorization expires in (seconds)",
877-
placeholderText: "3600",
878-
dataType: "NUMBER",
879-
encrypted: false,
880-
isRequired: false,
881-
})}
882-
</FormInputContainer>
883-
884888
{!_.get(formData.authentication, "isAuthorizationHeader", true) &&
885889
this.renderOauth2CommonAdvanced()}
886890
</>

0 commit comments

Comments
 (0)