generated from GARAGENUM/flask_secure
65 lines
2.7 KiB
HTML
65 lines
2.7 KiB
HTML
{% extends "base.html" %}
|
|
{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors, prop_next %}
|
|
|
|
{% block content %}
|
|
<div class="column is-one-third">
|
|
{% include "security/_messages.html" %}
|
|
<h1 class="title">{{ _fsdomain('Login') }}</h1>
|
|
<div class="block">
|
|
<form action="{{ url_for_security('login') }}{{ prop_next() }}" method="POST" name="login_user_form">
|
|
<div class="box">
|
|
{{ login_user_form.hidden_tag() }}
|
|
{{ render_form_errors(login_user_form) }}
|
|
{% if "email" in identity_attributes %}
|
|
{{ render_field_with_errors(login_user_form.email) }}
|
|
{% endif %}
|
|
{% if login_user_form.username and "username" in identity_attributes %}
|
|
{% if "email" in identity_attributes %}
|
|
<h3>{{ _fsdomain("or") }}</h3>
|
|
{% endif %}
|
|
{{ render_field_with_errors(login_user_form.username) }}
|
|
{% endif %}
|
|
|
|
{{ render_field_with_errors(login_user_form.password) }}
|
|
</div>
|
|
{{ render_field(login_user_form.remember) }}
|
|
{{ render_field_errors(login_user_form.csrf_token) }}
|
|
{{ render_field(login_user_form.submit, class="button is-rounded is-primary", label="bonjour") }}
|
|
</form>
|
|
{% if security.webauthn %}
|
|
<hr class="fs-gap">
|
|
<h2>{{ _fsdomain("Use WebAuthn to Sign In") }}</h2>
|
|
<div>
|
|
<form method="GET" id="wan-signin-form" name="wan_signin_form">
|
|
<input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with WebAuthn') }}"
|
|
formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}">
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% if security.oauthglue %}
|
|
<hr class="fs-gap">
|
|
<h2>{{ _fsdomain("Use Social Oauth to Sign In") }}</h2>
|
|
{% for provider in security.oauthglue.provider_names %}
|
|
<div class="fs-gap">
|
|
<form method="POST" id={{ provider }}-form name={{ provider }}_form>
|
|
<input id={{ provider }} name={{ provider }} type="submit" value="{{ _fsdomain('Sign in with ')~provider }}"
|
|
formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}">
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if google_login_url is defined %}
|
|
<a class="button is-rounded is-primary" href="{{ google_login_url() }}" class="button is-primary">
|
|
<span class="icon">
|
|
<i class="fab fa-google"></i>
|
|
</span>
|
|
<span>Sign in with Google</span>
|
|
</a>
|
|
{% endif %}
|
|
{% if security.recoverable %}
|
|
<a class="button is-rounded is-primary" href="{{ url_for_security('forgot_password') }}">{{ _fsdomain('Forgot password') }}</a><br/>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|