I resolved this problem by disabling HTTPS in dev environment, the idea came from an unrelated answer by Gottlieb Notschnabel.
An %auth_required_channel%
value is defined in the different environments configuration files:
app/config/config_dev.yml
parameters:
auth_required_channel: 'http'
app/config/config_test.yml
parameters:
auth_required_channel: 'http'
app/config/config_prod.yml
parameters:
auth_required_channel: 'https'
app/config/security.yml
This parameter is defined to require the HTTP or HTTPS channel:
security:
[...]
access_control:
[...]
- { path: ^/(en|fr)/admin, roles: ROLE_ADMIN, requires_channel: %auth_required_channel% }