From f696ae8cceef1fb76775eaae9fcfc4d9448f3407 Mon Sep 17 00:00:00 2001 From: AugustoLopezProcess Date: Mon, 18 May 2026 18:43:42 -0400 Subject: [PATCH 1/3] Change on clients adding modal for plainSecret --- .../Controllers/Auth/ClientController.php | 1 - ProcessMaker/Http/Resources/AuthClient.php | 2 +- .../components/AuthClientsListing.vue | 36 ------------- resources/lang/en.json | 3 ++ resources/lang/es.json | 3 ++ .../views/admin/auth-clients/index.blade.php | 54 +++++++++++++++++-- 6 files changed, 58 insertions(+), 41 deletions(-) diff --git a/ProcessMaker/Http/Controllers/Auth/ClientController.php b/ProcessMaker/Http/Controllers/Auth/ClientController.php index f77930c7e2..780fbe81dd 100644 --- a/ProcessMaker/Http/Controllers/Auth/ClientController.php +++ b/ProcessMaker/Http/Controllers/Auth/ClientController.php @@ -65,7 +65,6 @@ public function store(Request $request) ); } - $client->makeVisible('secret'); AuthClientCreated::dispatch($client->getAttributes()); return new AuthClientResource($client); diff --git a/ProcessMaker/Http/Resources/AuthClient.php b/ProcessMaker/Http/Resources/AuthClient.php index a9681fb083..271c106a5a 100644 --- a/ProcessMaker/Http/Resources/AuthClient.php +++ b/ProcessMaker/Http/Resources/AuthClient.php @@ -26,7 +26,7 @@ public function toArray($request) return [ 'id' => $this->id, 'name' => $this->name, - 'secret' => $this->secret, + 'secret' => $this->plainSecret, 'redirect' => $this->redirect, 'revoked' => $this->revoked, 'types' => $types, diff --git a/resources/js/admin/auth-clients/components/AuthClientsListing.vue b/resources/js/admin/auth-clients/components/AuthClientsListing.vue index 24a5f29baf..b8777c0bb6 100644 --- a/resources/js/admin/auth-clients/components/AuthClientsListing.vue +++ b/resources/js/admin/auth-clients/components/AuthClientsListing.vue @@ -33,19 +33,6 @@ :divider="true" /> - - @@ -73,7 +59,6 @@ export default { props: ["filter", "permission"], data() { return { - copytext: "", sortOrder: [ { field: "name", @@ -101,10 +86,6 @@ export default { return val.substr(0, 20) + "..."; }, }, - { - title: () => this.$t("Client Secret"), - name: "__slot:secret", - }, { name: "__slot:actions", title: "", @@ -184,11 +165,6 @@ export default { } this.fetch(); }, - copySecret(secret) { - this.$refs.copytext.value = secret; - this.$refs.copytext.select(); - document.execCommand("copy"); - }, onNavigate(action, data) { switch (action.value) { case 'edit-item': @@ -223,15 +199,3 @@ export default { }, }; - - diff --git a/resources/lang/en.json b/resources/lang/en.json index bbe4bc36dd..0161aa01bc 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -474,6 +474,7 @@ "Copy Control": "Copy Control", "Copy Element": "Copy Element", "Copy link": "Copy link", + "Copy Secret To Clipboard": "Copy Secret To Clipboard", "Copy Screen": "Copy Screen", "Copy Script": "Copy Script", "Copy this URL into your Atlassian authorization settings": "Copy this URL into your Atlassian authorization settings", @@ -498,6 +499,7 @@ "Create an Inbox Rule Now": "Create an Inbox Rule Now", "Create Auth Clients": "Create Auth Clients", "Create AuthClients": "Create Auth-Clients", + "Create Auth-Client": "Create Auth-Client", "Create Bundle": "Create Bundle", "Create Categories": "Create Categories", "Create Category": "Create Category", @@ -2355,6 +2357,7 @@ "This file is password protected. Enter the password below to continue with the import.": "This file is password protected. Enter the password below to continue with the import.", "This is a Beta version and when using Quickfill, it may replace the pre-filled information in the form.": "This is a Beta version and when using Quickfill, it may replace the pre-filled information in the form.", "This is an AI feature and can provide inaccurate or biased responses.": "This is an AI feature and can provide inaccurate or biased responses.", + "This is the only time you will be able to view the client secret. Keep it in a safe place.": "This is the only time you will be able to view the client secret. Keep it in a safe place.", "This is your security code: :code": "This is your security code: :code", "This may cause validation errors during submission.": "This may cause validation errors during submission.", "This must be valid JSON": "This must be valid JSON", diff --git a/resources/lang/es.json b/resources/lang/es.json index 5f954b5061..cb2e96816f 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -455,6 +455,7 @@ "Copy Control": "Control de copia", "Copy Element": "Copiar elemento", "Copy link": "Copiar enlace", + "Copy Secret To Clipboard": "Copiar secreto al portapapeles", "Copy Screen": "Copiar pantalla", "Copy Script": "Copiar script", "Copy this URL into your Atlassian authorization settings": "Copie esta URL en su configuración de autorización de Atlassian", @@ -474,6 +475,7 @@ "Create a new Process": "Crea un nuevo Proceso", "Create a Project": "Crea un Proyecto", "Create An Auth-Client": "Crear un cliente autenticado", + "Create Auth-Client": "Crear cliente autenticado", "Create an Inbox Rule Now": "Crea una Regla de Bandeja de Entrada Ahora", "Create Auth Clients": "Crear clientes de autenticación", "Create AuthClients": "Crear clientes autenticados", @@ -2293,6 +2295,7 @@ "This file is password protected. Enter the password below to continue with the import.": "Este archivo está protegido con contraseña. Ingrese la contraseña a continuación para continuar con la importación.", "This is a Beta version and when using Quickfill, it may replace the pre-filled information in the form.": "Esta es una versión Beta y al usar Quickfill, puede reemplazar la información previamente llenada en el formulario.", "This is an AI feature and can provide inaccurate or biased responses.": "Esta es una función de IA y puede proporcionar respuestas inexactas o sesgadas.", + "This is the only time you will be able to view the client secret. Keep it in a safe place.": "Esta es la única vez que podrás ver el secreto del cliente. Manténgalo en un lugar seguro.", "This is your security code: :code": "This is your security code: :code", "This may cause validation errors during submission.": "Esto puede causar errores de validación durante la presentación.", "This must be valid JSON": "Este debe ser un JSON válido", diff --git a/resources/views/admin/auth-clients/index.blade.php b/resources/views/admin/auth-clients/index.blade.php index fabf5a8d54..91b28d9bad 100644 --- a/resources/views/admin/auth-clients/index.blade.php +++ b/resources/views/admin/auth-clients/index.blade.php @@ -40,6 +40,26 @@ +
- @endsection @@ -88,8 +107,12 @@ errors: null, disabled: false, title:'', + secretTitle:'', + customModalButtons: [], + secret: "", }, beforeMount() { + this.initCustomModalButtons(); this.resetValues(); }, methods: { @@ -120,8 +143,9 @@ data: this.authClient, }).then(response => { this.$refs.createEditAuthClient.hide(); - this.$refs.authClientList.fetch(); this.loading = false; + this.secret = response.data.secret + this.$refs.secretModal.show(); ProcessMaker.alert(this.$t("The auth client was ") + verb + ".", this.$t("success")) }).catch(error => { this.disabled = false; @@ -130,6 +154,7 @@ }, resetValues() { this.title = this.$t('Create Auth-Client') + this.secretTitle = this.$t('Copy Secret To Clipboard') this.authClient = { id: null, name: "", @@ -143,12 +168,35 @@ types: null }; this.disabled = false; + this.initCustomModalButtons(); }, edit(item) { this.title = this.$t('Edit Auth Client'); this.authClient = item; this.$refs.createEditAuthClient.show(); - } + }, + initCustomModalButtons() { + this.customModalButtons = [ + { + content: "Close", + action: "close", + variant: "secondary", + disabled: false, + hidden: false, + }, + ]; + }, + hideSecretModal() { + this.$refs.secretModal.hide(); + this.$refs.authClientList.fetch(); + }, + copySecret(secret) { + navigator.clipboard.writeText(secret).then(() => { + ProcessMaker.alert(this.$t("Secret copied to clipboard."), "success"); + }, () => { + ProcessMaker.alert(this.$t("Secret not copied to clipboard."), "danger"); + }); + }, }, }) From 7eb50e16079047456462c6927f38cf3beb3313df Mon Sep 17 00:00:00 2001 From: AugustoLopezProcess Date: Tue, 19 May 2026 13:13:13 -0400 Subject: [PATCH 2/3] Dont show modal on edit and refresh clients --- resources/views/admin/auth-clients/index.blade.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/views/admin/auth-clients/index.blade.php b/resources/views/admin/auth-clients/index.blade.php index 91b28d9bad..d306571ee3 100644 --- a/resources/views/admin/auth-clients/index.blade.php +++ b/resources/views/admin/auth-clients/index.blade.php @@ -144,8 +144,13 @@ }).then(response => { this.$refs.createEditAuthClient.hide(); this.loading = false; - this.secret = response.data.secret - this.$refs.secretModal.show(); + if (response.data.secret) { + this.secret = response.data.secret + this.$refs.secretModal.show(); + } + else { + this.$refs.authClientList.fetch(); + } ProcessMaker.alert(this.$t("The auth client was ") + verb + ".", this.$t("success")) }).catch(error => { this.disabled = false; From 83fffedaf04d2f2859d1ebcf5e6c16e8eb4aba68 Mon Sep 17 00:00:00 2001 From: AugustoLopezProcess Date: Tue, 19 May 2026 14:13:47 -0400 Subject: [PATCH 3/3] Deleting secret in transform for manual filter --- .../js/admin/auth-clients/components/AuthClientsListing.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/js/admin/auth-clients/components/AuthClientsListing.vue b/resources/js/admin/auth-clients/components/AuthClientsListing.vue index b8777c0bb6..6b55bcfa32 100644 --- a/resources/js/admin/auth-clients/components/AuthClientsListing.vue +++ b/resources/js/admin/auth-clients/components/AuthClientsListing.vue @@ -110,8 +110,7 @@ export default { data = data.filter((item) => { return ( item.name.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 || - item.redirect.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 || - item.secret.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 + item.redirect.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 ); }); }