@model OidcSamples.AuthorizationServer.Quickstart.Account.TotpViewModel

<div>
    <partial name="_ValidationSummary" />

    <div class="row justify-content-center align-items-center">
        <div class="col-sm-6">
            <div class="card p-5">
                <h3 class="text-custom">Register Moble Device</h3>
                <div class="panel panel-default">
                <div class="panel-heading">
                    <h5 class="panel-title font-weight-normal mb-4 mt-3">Scan the QR code with your authenticator application</h5>
                </div>
                <div class="panel-body">
                    <form asp-route="RegisterForMfa">
                        <fieldset>
                            <input type="hidden" asp-for="Secret" />
                            <div class="form-group d-flex justify-content-center align-items-center my-2">
                                <div id="qrCode"></div>
                            </div>
                        </fieldset>
                    </form>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    <script src="~/lib/qrcodejs/qrcode.min.js"></script>
    <script type="text/javascript">
        new QRCode(document.getElementById("qrCode"),
            {
                text: "@Html.Raw(Model.KeyUri)",
                width: 150,
                height: 150
            });
    </script>
}