
<input type="hidden" id="_csrf" value="{{csrfToken}}">
<input id="version" type="hidden" id="version" value="{{u2fRegRequest.version}}">
<input id="appId" type="hidden" id="appId" value="{{u2fRegRequest.appId}}">
<input id="challenge" type="hidden" id="challenge" value="{{u2fRegRequest.challenge}}">

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> Two factor authentication</h3>
    </div>
    <div class="panel-body">

        <div style="margin:10px 0;">

            <div id="u2f-wait">
                <img src="/images/u2f-wait.png" />
            </div>

            <div id="u2f-fail" style="display: none">
                <img src="/images/u2f-fail.png" />
            </div>

            <div id="u2f-success" style="display: none">
                <img src="/images/u2f-success.png" />
            </div>

        </div>

        <p id="message">
            Initializing...
        </p>

        <div>
            <a href="/account/security"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Cancel</a>
        </div>
    </div>
</div>

<script>
// U2F support must be checked *before* loading /u2f-api.js
var U2FSUPPORT = typeof u2f === 'object' || typeof chrome === 'object';
</script>

<script src="/u2f-api.js"></script>
<script src="/enable-u2f.js"></script>
