- Introduced a new public `/health` endpoint to verify database connectivity and list active admin users. - Updated `verify_admin` function to return the actual username on successful verification and handle various password hashing schemes, including legacy formats. - Modified login logic to use the returned username for session management. - Updated `login.html` form to support file uploads by adding `enctype` attribute.
16 lines
708 B
HTML
16 lines
708 B
HTML
{% extends "base.html" %}
|
|
{% block title %}Login — Portal Auth Admin{% endblock %}
|
|
{% block content %}
|
|
<div class="login-card">
|
|
<h1>Admin login</h1>
|
|
<p class="login-hint">Only users with role <code>admin</code> can access this dashboard.</p>
|
|
<form method="post" action="{{ url_for('login') }}" class="login-form" enctype="multipart/form-data">
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username" required autofocus autocomplete="username">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required autocomplete="current-password">
|
|
<button type="submit">Log in</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|