Configuring the security access

Login page

Now that you have an admin panel, you want to make sure admin users are the only ones allowed to access its URL. To secure your back-office interface, you can simply resort to Symfony's Security configuration with 4 basic steps :

Create a user entity

You can use the Symfony maker to create a new user.

Learn more on how to create a User

Configure the user provider

Here is an example of a user provider configuration:

Configure the firewall

Here is an example of how to configure a firewall for your admin routes:

Configure Access Control Authorization

Only admin users will have access to "/admin" routes.

Last updated