| 1 |
{% set title = title|default(_fsdomain('Sign In')) %} |
| 2 |
{% extends "security/base.html" %} |
| 3 |
{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors, prop_next %} |
| 4 |
|
| 5 |
{% block content %} |
| 6 |
{% include "security/_messages.html" %} |
| 7 |
<h1>{{ _fsdomain("Sign In") }}</h1> |
| 8 |
<form action="{{ url_for_security('us_signin') }}{{ prop_next() }}" method="post" name="us_signin_form"> |
| 9 |
{{ us_signin_form.hidden_tag() }} |
| 10 |
{{ render_form_errors(us_signin_form) }} |
| 11 |
{{ render_field_with_errors(us_signin_form.identity) }} |
| 12 |
{{ render_field_with_errors(us_signin_form.passcode) }} |
| 13 |
{{ render_field_with_errors(us_signin_form.remember) }} |
| 14 |
{{ render_field(us_signin_form.submit) }} |
| 15 |
{% if code_methods %} |
| 16 |
<h4>{{ _fsdomain("Request one-time code be sent") }}</h4> |
| 17 |
{% for subfield in us_signin_form.chosen_method %} |
| 18 |
{% if subfield.data in code_methods %}{{ render_field_with_errors(subfield) }}{% endif %} |
| 19 |
{% endfor %} |
| 20 |
{{ render_field_errors(us_signin_form.chosen_method) }} |
| 21 |
{{ render_field(us_signin_form.submit_send_code, formaction=url_for_security('us_signin_send_code')) }} |
| 22 |
{% endif %} |
| 23 |
</form> |
| 24 |
{% if security.webauthn %} |
| 25 |
<hr class="fs-gap"> |
| 26 |
<h2>{{ _fsdomain("Use a Passkey to Sign In") }}</h2> |
| 27 |
<div class="fs-gap"> |
| 28 |
<form method="get" id="wan-signin-form" name="wan_signin_form"> |
| 29 |
<input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with a passkey') }}" formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}"> |
| 30 |
</form> |
| 31 |
</div> |
| 32 |
{% endif %} |
| 33 |
{% if security.oauthglue %} |
| 34 |
<hr class="fs-gap"> |
| 35 |
<h2>{{ _fsdomain("Use Social Oauth to Sign In") }}</h2> |
| 36 |
{% for provider in security.oauthglue.provider_names %} |
| 37 |
<div class="fs-gap"> |
| 38 |
<form method="post" id="{{ provider }}_form" name="{{ provider }}_form"> |
| 39 |
<input id="{{ provider }}" name="{{ provider }}" type="submit" value="{{ _fsdomain('Sign in with %(provider)s', provider=provider) }}" formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}"> |
| 40 |
{% if csrf_token is defined %} |
| 41 |
<input id="{{ provider }}_csrf_token" name="{{ provider }}_csrf_token" type="hidden" value="{{ csrf_token() }}"> |
| 42 |
{% endif %} |
| 43 |
</form> |
| 44 |
</div> |
| 45 |
{% endfor %} |
| 46 |
{% endif %} |
| 47 |
{% include "security/_menu.html" %} |
| 48 |
{% endblock content %} |