From 6956adc2318804b879346e916235aae401f925fb Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Tue, 26 Sep 2023 11:47:27 +0300 Subject: [PATCH] Web:Client:PortalSettings: fix create and edit oauth client --- .../OAuth/sub-components/ClientForm/index.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx index 2b58addd30..23ff33dcdd 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx @@ -47,14 +47,16 @@ const ClientForm = ({ description: "", redirectUrl: "", logoutRedirectUrl: "", - // allowedOrigins: "", - // websiteUrl: "", + privacyURL: "", - // serviceUrl: "", }); - const [clientId, setClientId] = React.useState(""); - const [secret, setSecret] = React.useState(""); + const [clientId, setClientId] = React.useState( + "23b2ec16-6a10-462b-8084-16be8e105b73" + ); + const [secret, setSecret] = React.useState( + "d2c083aa-9a2d-4147-9328-df32b7be0294" + ); const [scopes, setScopes] = React.useState([]); const [checkedScopes, setCheckedScopes] = React.useState([]); @@ -98,7 +100,7 @@ const ClientForm = ({ newClient.secret = secret; newClient.scopes = [...checkedScopes]; - if (id) { + if (!id) { await saveClient(newClient); } else { await updateClient(clientId, newClient); @@ -205,6 +207,7 @@ const ClientForm = ({ break; } } + isValid = true; } else { isValid = false; }