implemented optional authentification app and stricter password and user rules.
Also against brute force.
This commit is contained in:
+31
-19
@@ -5,35 +5,47 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="../static/css/login.css">
|
||||
<link rel="stylesheet" href="../static/css/login.css">
|
||||
</link>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/login.css') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('login.login') }}"><span>Login</span></a></li>
|
||||
<li><a href="{{ url_for('login.register') }}"><span>Create account</span></a></li>
|
||||
<li><a href="{{ url_for('login.login') }}">Login</a></li>
|
||||
<li><a href="{{ url_for('login.register') }}">Create account</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>Login to your account</h1>
|
||||
<main class="auth-shell">
|
||||
<section class="auth-panel">
|
||||
<h1>Login to your account</h1>
|
||||
<p class="muted">If two-factor authentication is enabled, enter the current 6-digit code from your authenticator app after the password check.</p>
|
||||
|
||||
{% if error %}
|
||||
<p class="error">{{ error }}</p>
|
||||
{% endif %}
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<p class="message {{ category }}">{{ message }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form action="{{ url_for('login.login') }}" method="post">
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" name="username" required />
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" name="password" required />
|
||||
<button class="magnetic" type="submit">Login</button>
|
||||
</form>
|
||||
{% if error %}
|
||||
<p class="message error">{{ error }}</p>
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ url_for('login.login') }}" method="post">
|
||||
<label for="username">Username</label>
|
||||
<input id="username" type="text" name="username" maxlength="20" required value="{{ username or '' }}">
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input id="password" type="password" name="password" minlength="8" maxlength="128" required>
|
||||
|
||||
<button class="magnetic" type="submit" data-loading-label="Checking login...">Login</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
<script src="../static/js/login.js" defer></script>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/login.js') }}" defer></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user