Enhance access code guidance and resend functionality

Added new localized strings for improved user guidance in `Resource.*.resx` files, including instructions and messages for resending access codes. Updated `LoginReceiverPage.razor` to include detailed UI elements for access code guidance, such as step-by-step instructions and a resend button with dynamic feedback.

Introduced new state variables (`IsResending`, `ResendRequestFailed`, `ResendResult`) and implemented the `ResendAccessCodeAsync` method to handle resend logic. Modified `AuthService.RequestEnvelopeReceiverAccessCodeAsync` to support an `autoGenerated` flag, enabling differentiation between automatic and manual access code requests.

These changes improve the user experience by providing clearer instructions and a streamlined process for resending access codes.
This commit is contained in:
2026-11-16 13:41:50 +01:00
parent 6c9b8ad3a8
commit e13413c7fc
5 changed files with 88 additions and 6 deletions

View File

@@ -38,11 +38,11 @@ public class AuthService(IHttpClientFactory httpClientFactory)
/// Triggers access code e-mail request flow for the receiver login page.
/// Calls POST /api/Auth/envelope-receiver/{key}/request-access-code.
/// </summary>
public async Task<SendAccessCodeResult?> RequestEnvelopeReceiverAccessCodeAsync(string envelopeKey, CancellationToken cancel = default)
public async Task<SendAccessCodeResult?> RequestEnvelopeReceiverAccessCodeAsync(string envelopeKey, bool autoGenerated = true, CancellationToken cancel = default)
{
using var http = CreateDefaultClient();
var response = await http.PostAsync(
$"/api/Auth/envelope-receiver/{Uri.EscapeDataString(envelopeKey)}/request-access-code",
$"/api/Auth/envelope-receiver/{Uri.EscapeDataString(envelopeKey)}/request-access-code?autoGenerated={autoGenerated}",
null,
cancel);