Registration and login perfect

This commit is contained in:
Olivier PARPAILLON
2024-11-19 15:58:04 +01:00
parent dc01c2e216
commit e10becf01d
10 changed files with 118 additions and 171 deletions

View File

@@ -4,8 +4,11 @@ security:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers:
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
id: App\Security\UserProvider
entity:
class: App\Entity\Participant
property: email
# used to reload user from session & other features (e.g. switch_user)
# used to reload user from session & other features (e.g. switch_user)
firewalls:
@@ -15,6 +18,8 @@ security:
main:
lazy: true
provider: app_user_provider
custom_authenticators:
- App\Security\LoginFormAuthenticator
form_login:
login_path: app_login
check_path: app_login

View File

@@ -7,9 +7,6 @@ parameters:
services:
# default configuration for services in *this* file
App\Security\UserProvider:
arguments:
$entityManager: '@doctrine.orm.entity_manager'
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.