2021-04-20 07:06:32 +02:00
|
|
|
@model Fido2NetLib.CredentialCreateOptions
|
|
|
|
@{
|
2021-11-11 13:03:08 +01:00
|
|
|
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Register your security device");
|
2021-04-20 07:06:32 +02:00
|
|
|
}
|
2021-09-13 03:16:52 +02:00
|
|
|
|
2024-06-19 15:23:10 +02:00
|
|
|
<div class="sticky-header">
|
|
|
|
<nav aria-label="breadcrumb">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li class="breadcrumb-item">
|
|
|
|
<a asp-controller="UIManage" asp-action="TwoFactorAuthentication">Two Factor Authentication</a>
|
|
|
|
</li>
|
|
|
|
<li class="breadcrumb-item active" aria-current="page">Register Device</li>
|
|
|
|
</ol>
|
|
|
|
<h2>@ViewData["Title"]</h2>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<partial name="_StatusMessage" />
|
2022-01-18 09:54:22 +01:00
|
|
|
|
|
|
|
<p>Insert your security device and proceed.</p>
|
|
|
|
|
2021-09-13 03:16:52 +02:00
|
|
|
<form asp-action="CreateResponse" id="registerForm">
|
2022-01-18 02:23:07 +01:00
|
|
|
<input type="hidden" name="data" id="data"/>
|
|
|
|
<input type="hidden" name="name" id="name" value="@(ViewData.ContainsKey("CredentialName") ? ViewData["CredentialName"] : string.Empty)"/>
|
2021-04-20 07:06:32 +02:00
|
|
|
</form>
|
|
|
|
<div class="row">
|
2022-01-27 03:56:46 +01:00
|
|
|
<div class="col-xl-8">
|
2022-01-18 09:54:22 +01:00
|
|
|
<div id="info-message" class="alert alert-info mb-3 d-none">
|
|
|
|
<div class="d-flex align-items-center">
|
2024-05-20 01:57:46 +02:00
|
|
|
<div class="spinner-border spinner-border-sm me-2 fido-running" role="status">
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
|
|
|
</div>
|
2022-01-18 09:54:22 +01:00
|
|
|
<span>If your security device has a button, tap on it.</span>
|
|
|
|
</div>
|
2021-04-20 07:06:32 +02:00
|
|
|
</div>
|
2022-01-18 09:54:22 +01:00
|
|
|
<button id="btn-start" class="btn btn-primary d-none" type="button">Start</button>
|
2021-04-20 07:06:32 +02:00
|
|
|
<p id="error-message" class="d-none alert alert-danger"></p>
|
2021-09-13 03:16:52 +02:00
|
|
|
<a id="btn-retry" class="btn btn-secondary d-none">Retry</a>
|
2021-04-20 07:06:32 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-01-18 09:54:22 +01:00
|
|
|
@section PageFootContent {
|
|
|
|
<script>
|
|
|
|
document.getElementById('btn-retry').addEventListener('click', function () { window.location.reload() });
|
|
|
|
// send to server for registering
|
|
|
|
window.makeCredentialOptions = @Json.Serialize(Model);
|
|
|
|
</script>
|
|
|
|
<script src="~/js/webauthn/helpers.js"></script>
|
|
|
|
<script src="~/js/webauthn/register.js"></script>
|
|
|
|
}
|