From 6b52e226f47852dd2157f4066601d3518b0d616c Mon Sep 17 00:00:00 2001 From: shanliuling <1362913430@qq.com> Date: Mon, 16 Mar 2026 17:10:02 +0800 Subject: [PATCH 1/2] feat: move expires_in field after scope in OAuth2 datasource config (#31059) --- .../RestAPIDatasourceForm.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx index 341cf1dc5814..9be32f8cd32a 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx @@ -683,6 +683,16 @@ class DatasourceRestAPIEditor extends React.Component { isRequired: false, })} + + {this.renderInputTextControlViaFormControl({ + configProperty: "authentication.expiresIn", + label: "Authorization expires in (seconds)", + placeholderText: "3600", + dataType: "NUMBER", + encrypted: false, + isRequired: false, + })} + @@ -870,16 +880,6 @@ class DatasourceRestAPIEditor extends React.Component { false, )} - - {this.renderInputTextControlViaFormControl({ - configProperty: "authentication.expiresIn", - label: "Authorization expires in (seconds)", - placeholderText: "3600", - dataType: "NUMBER", - encrypted: false, - isRequired: false, - })} - {!_.get(formData.authentication, "isAuthorizationHeader", true) && this.renderOauth2CommonAdvanced()} From c17a9e61c0e7a4bc1f17818f20c52451246e34ff Mon Sep 17 00:00:00 2001 From: shanliuling <1362913430@qq.com> Date: Mon, 16 Mar 2026 17:27:09 +0800 Subject: [PATCH 2/2] fix: show expires_in field only for Authorization Code grant type --- .../RestAPIDatasourceForm.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx index 9be32f8cd32a..a0d506bb8dd3 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx @@ -683,16 +683,6 @@ class DatasourceRestAPIEditor extends React.Component { isRequired: false, })} - - {this.renderInputTextControlViaFormControl({ - configProperty: "authentication.expiresIn", - label: "Authorization expires in (seconds)", - placeholderText: "3600", - dataType: "NUMBER", - encrypted: false, - isRequired: false, - })} - @@ -844,6 +834,16 @@ class DatasourceRestAPIEditor extends React.Component { return ( <> {this.renderOauth2Common()} + + {this.renderInputTextControlViaFormControl({ + configProperty: "authentication.expiresIn", + label: "Authorization expires in (seconds)", + placeholderText: "3600", + dataType: "NUMBER", + encrypted: false, + isRequired: false, + })} +