@model OidcSamples.AuthorizationServer.Quickstart.Account.TotpViewModel

<div>
    <div class="page-header">
        <h1>Register for MFA</h1>
    </div>

    <partial name="_ValidationSummary" />

    <div class="row">
        <div class="col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">Scan the QR code with your authenticator application</h3>
                </div>
                <div class="panel-body">
                    <form asp-route="RegisterForMfa">
                        <fieldset>
                            <input type="hidden" asp-for="Secret" />
                            <div class="form-group">
                                <div id="qrCode"></div>
                            </div>

                            <div class="form-group">
                                <button class="btn btn-primary">Registration successful</button>
                            </div>
                        </fieldset>
                    </form>
                </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>
}