feat(auth): Unterstützung für Authenticator-App-Setup-Link hinzugefügt
- Es wurde ein neuer Abschnitt eingeführt, der einen Link für Benutzer anzeigt, um ihre Authenticator-App einzurichten, wenn viaAuthenticator aktiviert ist. - Abruf von envelopeKey aus ViewData hinzugefügt, um den Einrichtungslink zu erstellen. - Refactored codeKeyName Initialisierung für saubereren Code.
This commit is contained in:
parent
6b0ec9386c
commit
3e6e2078bb
@ -166,7 +166,7 @@
|
||||
<value>Wir haben Ihnen gerade den Zugriffscode an die hinterlegte Email Adresse gesendet. Dies kann evtl. einige Minuten dauern.</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticator" xml:space="preserve">
|
||||
<value>Ihr QR-Code ist bis {0} gültig.</value>
|
||||
<value>Bitte geben Sie den in Ihrer Authenticator-App angegebenen TOTP-Code ein.</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticatorNew" xml:space="preserve">
|
||||
<value>Wir haben den QR-Code an Ihre E-Mail-Adresse gesendet. Ihr QR-Code ist bis {0} gültig. Sie können ihn für alle Umschläge verwenden, die Sie an diese E-Mail-Adresse erhalten.</value>
|
||||
|
||||
@ -166,7 +166,7 @@
|
||||
<value>We have just sent you the access code to the email address you provided. This may take a few minutes.</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticator" xml:space="preserve">
|
||||
<value>Your QR code is valid until {0}.</value>
|
||||
<value>Please enter the TOTP provided in your Authenticator app.</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticatorNew" xml:space="preserve">
|
||||
<value>We have sent the QR code to your e-mail address. Your QR code is valid until {0}. You can use it for all envelopes received at this email address.</value>
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
ViewData["Title"] = _localizer[WebKey.DocProtected];
|
||||
var userCulture = ViewData["UserCulture"] as Culture;
|
||||
string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode";
|
||||
string codePropName = char.ToUpper(codeType[0]) + codeType.Substring(1);
|
||||
string codeKeyName = codePropName.Replace("Code", "");
|
||||
string codeKeyName = (char.ToUpper(codeType[0]) + codeType.Substring(1)).Replace("Code", "");
|
||||
bool viaSms = codeType == "smsCode";
|
||||
bool viaAuthenticator = codeType == "authenticatorCode";
|
||||
bool viaTFA = viaSms || viaAuthenticator;
|
||||
@ -16,6 +15,7 @@
|
||||
DateTime? qrCodeExpiration = ViewData["QRCodeExpiration"] is DateTime _qrCodeExpiration ? _qrCodeExpiration : null;
|
||||
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||
}
|
||||
<div class="page container py-4 px-4">
|
||||
<header class="text-center">
|
||||
@ -31,6 +31,19 @@
|
||||
</div>
|
||||
<h1>@_localizer[WebKey.Formats.LockedTitle.Format(codeKeyName)]</h1>
|
||||
</header>
|
||||
@if (viaAuthenticator)
|
||||
{
|
||||
<section class="text-center">
|
||||
<p class="m-0 p-0">
|
||||
Klicken Sie auf den
|
||||
<a class="icon-link m-0 p-0" href="/tfa/@envelopeKey" style="text-decoration: none;" target="_blank">
|
||||
Link
|
||||
<i class="bi bi-box-arrow-up-right"></i>
|
||||
</a>
|
||||
um Ihre Authenticator-App einzurichten.
|
||||
</p>
|
||||
</section>
|
||||
}
|
||||
<section class="text-center">
|
||||
<p>@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format(qrCodeExpiration.ToString())</p>
|
||||
</section>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user