From 319d5d8db4c2a5d9dbe233068f9a330ee64dcf88 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:59:43 -0300 Subject: [PATCH 1/5] fix: add auth-required page state payload Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- lib/Service/IdentifyMethod/Email.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/Service/IdentifyMethod/Email.php b/lib/Service/IdentifyMethod/Email.php index 3019a6df26..aab26b52cc 100644 --- a/lib/Service/IdentifyMethod/Email.php +++ b/lib/Service/IdentifyMethod/Email.php @@ -138,7 +138,19 @@ private function throwIfIsAuthenticatedWithDifferentAccount(): void { } throw new LibresignException(json_encode([ 'action' => JSActions::ACTION_DO_NOTHING, - 'errors' => [['message' => $this->identifyService->getL10n()->t('This document is not yours. Log out and use the sign link again.')]], + 'page_state' => 'authentication_required', + 'page_state_data' => [ + // TRANSLATORS Title shown when a signing link is opened while a different authenticated Nextcloud session is active. This is an expected security check, not a system failure. + 'title' => $this->identifyService->getL10n()->t('Authentication required'), + // TRANSLATORS Description shown when the current authenticated Nextcloud session cannot be used to sign a document because it does not match the authorized signer. + 'description' => $this->identifyService->getL10n()->t('The current authenticated session cannot be used to sign this document.'), + 'noteType' => 'info', + 'icon' => 'info', + ], + 'errors' => [[ + // TRANSLATORS Guidance shown when the current authenticated Nextcloud session cannot be used to sign a document because it does not match the authorized signer. Keep it generic and do not mention emails or delivery channels. + 'message' => $this->identifyService->getL10n()->t('To continue, sign out from the current account and open the signing link again, or open the signing link in a browser session where this account is not active.'), + ]], ])); } From 83cae4be14cb038eb0032cf359cb25fc873da112 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:59:52 -0300 Subject: [PATCH 2/5] fix: render backend-driven auth guidance Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/views/DefaultPageError.vue | 38 +++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/src/views/DefaultPageError.vue b/src/views/DefaultPageError.vue index cb3fbd71ef..329fbac682 100644 --- a/src/views/DefaultPageError.vue +++ b/src/views/DefaultPageError.vue @@ -15,13 +15,13 @@