From 8383d79c91fadda62915086ed3e9d85297d6844c Mon Sep 17 00:00:00 2001 From: Piyush Date: Thu, 25 Feb 2021 12:01:21 +0530 Subject: [PATCH] Remove client side validation on save for OAuth Datasource (#3131) --- .../DataSourceEditor/RestAPIDatasourceForm.tsx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx index 5716d9567e..7f953347fd 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx @@ -228,22 +228,6 @@ class DatasourceRestAPIEditor extends React.Component { const { formData } = this.props; if (!formData) return true; if (!formData.url) return true; - if (formData.authType === AuthType.OAuth2) { - const { authentication } = formData; - // weird state, wait for state to get fixed - if (!authentication) return true; - if ( - [GrantType.ClientCredentials, GrantType.AuthorizationCode].includes( - authentication.grantType, - ) - ) { - if (!authentication.accessTokenUrl) return true; - if (!authentication.clientId) return true; - } - if (authentication.grantType === GrantType.AuthorizationCode) { - if (!authentication.authorizationUrl) return true; - } - } return false; };