EnableAuthenticator.cshtml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @page
  2. @model EnableAuthenticatorModel
  3. @{
  4. ViewData["Title"] = "Configure authenticator app";
  5. ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
  6. }
  7. <partial name="_StatusMessage" for="StatusMessage" />
  8. <h3>@ViewData["Title"]</h3>
  9. <div>
  10. <p>To use an authenticator app go through the following steps:</p>
  11. <ol class="list">
  12. <li>
  13. <p>
  14. Download a two-factor authenticator app like Microsoft Authenticator for
  15. <a href="https://go.microsoft.com/fwlink/?Linkid=825072">Android</a> and
  16. <a href="https://go.microsoft.com/fwlink/?Linkid=825073">iOS</a> or
  17. Google Authenticator for
  18. <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en">Android</a> and
  19. <a href="https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8">iOS</a>.
  20. </p>
  21. </li>
  22. <li>
  23. <p>Scan the QR Code or enter this key <kbd>@Model.SharedKey</kbd> into your two factor authenticator app. Spaces and casing do not matter.</p>
  24. <div class="alert alert-info">Learn how to <a href="https://go.microsoft.com/fwlink/?Linkid=852423">enable QR code generation</a>.</div>
  25. <div id="qrCode"></div>
  26. <div id="qrCodeData" data-url="@Model.AuthenticatorUri"></div>
  27. </li>
  28. <li>
  29. <p>
  30. Once you have scanned the QR code or input the key above, your two factor authentication app will provide you
  31. with a unique code. Enter the code in the confirmation box below.
  32. </p>
  33. <div class="row">
  34. <div class="col-md-6">
  35. <form id="send-code" method="post">
  36. <div class="form-floating mb-3">
  37. <input asp-for="Input.Code" class="form-control" autocomplete="off" placeholder="Please enter the code."/>
  38. <label asp-for="Input.Code" class="control-label form-label">Verification Code</label>
  39. <span asp-validation-for="Input.Code" class="text-danger"></span>
  40. </div>
  41. <button type="submit" class="w-100 btn btn-lg btn-primary">Verify</button>
  42. <div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>
  43. </form>
  44. </div>
  45. </div>
  46. </li>
  47. </ol>
  48. </div>
  49. @section Scripts {
  50. <partial name="_ValidationScriptsPartial" />
  51. }