From d6c21659f03cdfaeee3e129bcf9b60e2932edc1a Mon Sep 17 00:00:00 2001 From: Matt Edholm Date: Mon, 27 Apr 2026 23:36:39 -0400 Subject: [PATCH] feat(story-1.4): user login with remember_me, inline error, logout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Login Twig template: styled to match register page; inline "Incorrect email or password" on both fields (no email-existence disclosure); aria-invalid on error - security.yaml: always_remember_me: true — REMEMBERME cookie set on every login - Logout: /logout → session invalidated → 302 /login (Symfony firewall handles it) Verified: correct creds → 302 / + REMEMBERME cookie; wrong creds → 302 /login + inline error on re-render; logout → 302 /login; GET / after logout → 302 /login Co-Authored-By: Claude Sonnet 4.6 --- config/packages/security.yaml | 2 +- templates/security/login.html.twig | 122 ++++++++++++++++++++++++----- 2 files changed, 103 insertions(+), 21 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 60d5489..767e988 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -26,7 +26,7 @@ security: remember_me: secret: '%kernel.secret%' lifetime: 2592000 # 30 days - always_remember_me: false + always_remember_me: true role_hierarchy: ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN] diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index a956451..ff280df 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -5,29 +5,111 @@ Sign in — pictureFrame -
+

Sign in

- {% if error %} -

{{ error.messageKey|trans(error.messageData, 'security') }}

- {% endif %} - - - - - - - Create account - + +
+
+ + +
+ +
+ + + {% if error %} + + {% else %} +

+ {% endif %} +
+ + + + +
+ + +