<p>Scan this with your authenticator app, then enter the code it shows.</p>
19
<divclass="qr">{{ qr|safe }}</div>
20
<pclass="small mute">Or enter the secret by hand: <code>{{ secret }}</code></p>
21
<divclass="sec-row"><labelfor="code">Code from the app</label><inputtype="text"id="code"name="code"inputmode="numeric"autocomplete="one-time-code"autofocusrequired><buttontype="submit">TURN ON</button></div>
<pclass="small mute">A code from your authenticator app is asked for at every sign in.</p>
27
<divclass="sec-row"><labelfor="password">Your password, to turn it off</label><inputtype="password"id="password"name="password"autocomplete="current-password"required><buttontype="submit"class="danger">TURN OFF</button></div>
<pclass="small mute">With it on, a time-based code from an authenticator app is asked for at every sign in.</p>
33
<buttontype="submit">SET UP</button>
34
</form>
35
{% endif %}
36
</section>
37
{% if !connected.is_empty() %}<sectionclass="card-box"id="connected">
38
<divclass="card-head"><h2>Connected accounts</h2><spanclass="small mute more">sign in with these instead of a password</span></div>
39
<ulclass="rows token-rows">{% for (id, name, login) in connected %}
40
<li>
41
<divclass="token-main"><divclass="token-name"><strong>{{ name }}</strong>{% if let Some(l) = login %} <spanclass="mute">{{ l }}</span>{% else %} <spanclass="small mute">not connected</span>{% endif %}</div></div>
42
<divclass="token-actions">{% if login.is_some() %}<formclass="inline"method="post"action="/settings/security/disconnect/{{ id }}"><inputtype="hidden"name="_csrf"value="{{ shell.csrf }}"><buttonclass="small">Disconnect</button></form>{% else %}<aclass="go small"href="/settings/security/connect/{{ id }}">Connect</a>{% endif %}</div>
<formclass="inline more"method="post"action="/settings/security/sessions"><inputtype="hidden"name="_csrf"value="{{ shell.csrf }}"><buttonclass="small"title="Sign out every browser except this one">Sign out everywhere else</button></form></div>
49
{% if sessions.is_empty() %}<pclass="empty small">No sessions.</p>{% else %}
50
<ulclass="rows token-rows">{% for x in sessions %}
51
<li>
52
<divclass="token-main">
53
<divclass="token-name"><strong>{{ x.browser }}</strong>{% if x.current %} <spanclass="tag">this browser</span>{% endif %}</div>
54
<divclass="small mute">{% if !x.address.is_empty() %}{{ x.address }} · {% endif %}used <timetitle="{{ x.seen_ms|when_i }}">{{ x.seen_ms|ago_i }}</time> · signed in <timetitle="{{ x.created_ms|when_i }}">{{ x.created_ms|ago_i }}</time></div>