fix: rename login field from 'email' to '_username'
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>
This commit is contained in:
parent
0706fdad58
commit
edc0cdfd5d
1 changed files with 24 additions and 0 deletions
24
templates/security/login.html.twig
Normal file
24
templates/security/login.html.twig
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% 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 %}
|
||||
Loading…
Reference in a new issue