Symfony FormLoginAuthenticator expects _username by default. The field used name="email" which caused 400 Bad Request on submit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
1 KiB
Twig
24 lines
1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Login{% endblock %}
|
|
|
|
{% block body %}
|
|
<div style="max-width:400px;margin:4rem auto;font-family:sans-serif">
|
|
<h1>SuperSeller Login</h1>
|
|
{% if error %}
|
|
<div style="color:red;margin-bottom:1rem">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
|
{% endif %}
|
|
<form method="post">
|
|
<div style="margin-bottom:1rem">
|
|
<label for="email">Email</label><br>
|
|
<input id="email" type="email" name="_username" value="{{ last_username }}" required autofocus style="width:100%;padding:.5rem">
|
|
</div>
|
|
<div style="margin-bottom:1rem">
|
|
<label for="password">Password</label><br>
|
|
<input id="password" type="password" name="password" required style="width:100%;padding:.5rem">
|
|
</div>
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
<button type="submit" style="padding:.5rem 1rem">Login</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|