On Symfony2/production, I get this error on my log file
request.CRITICAL:
Uncaught PHP Exception Twig_Error_Runtime:
"An exception has been thrown during the rendering of a template ("The token storage contains no authentication token.
One possible reason may be that there is no firewall configured for this URL.") in "TwigBundle:Exception:error.html.twig" at line 22."
Following a post, I have in my TwigBundle:Exception:error.html.twig
{% if app.user is defined and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
This is my security.yml
security:
encoders:
App\Entity\User: sha512
providers:
user:
entity: { class: App:User, property: email }
firewalls:
dev:
pattern: ^/(_(profiler|wdt|error)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: true
provider: user
form_login:
login_path: /
check_path: /securite/connexion/check
use_referer: true
logout:
path: app_security_logout
target: app_homepage
Any ideas ? Thanks