Skip to content

Commit

Permalink
feat(security): set User as user provider
Browse files Browse the repository at this point in the history
see: #20
  • Loading branch information
n3wborn committed Nov 1, 2023
1 parent 01d06ad commit 768ca3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ security:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers:
users_in_memory: { memory: null }
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
property: email
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
lazy: true
provider: users_in_memory
provider: app_user_provider

# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall
Expand Down

0 comments on commit 768ca3d

Please sign in to comment.