title: FOS User bundle confirm link forces you to login
body: <p>I've been asked to add a confirmation email into a CRM, whereupon a user will sign up then be sent an email with a link to confirm in order to enable their account. However, whenever the link is clicked it instantly redirects to the login page, which is useless since they have not confirmed it. I've tried to exclude it in the <code>security.yml</code> file, but thus far no luck.</p>
  
  <p>I've tried:</p>
  
  <pre><code>- { path: ^/register/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  
  - { path: ^/confirm/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  
  - { path: ^/register/confirm/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  </code></pre>
  
  <p>But none of these seem to work.</p>
  
  <p>As requested, the routing file for FOS registration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;routes xmlns="http://symfony.com/schema/routing"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"&gt;
  
      &lt;route id="fos_user_registration_register" path="/" methods="GET POST"&gt;
          &lt;default key="_controller"&gt;FOSUserBundle:Registration:register&lt;/default&gt;
      &lt;/route&gt;
  
      &lt;route id="fos_user_registration_check_email" path="/check-email" methods="GET"&gt;
          &lt;default key="_controller"&gt;FOSUserBundle:Registration:checkEmail&lt;/default&gt;
      &lt;/route&gt;
  
      &lt;route id="fos_user_registration_confirm" path="/confirm/{token}" methods="GET"&gt;
          &lt;default key="_controller"&gt;FOSUserBundle:Registration:confirm&lt;/default&gt;
      &lt;/route&gt;
  
      &lt;route id="fos_user_registration_confirmed" path="/confirmed" methods="GET"&gt;
          &lt;default key="_controller"&gt;FOSUserBundle:Registration:confirmed&lt;/default&gt;
      &lt;/route&gt;
  
  &lt;/routes&gt;
  </code></pre>
  
  <p>FOS User config:</p>
  
  <pre><code>fos_user:
      db_driver: orm
      firewall_name: main
      user_class: AppBundle\Entity\User
      registration:
          confirmation:
              enabled: true
              template:   emails/registration.html.twig
              from_email:
                  address:        noreply@siteemail.co.uk
                  sender_name:    #sender name here#
      resetting:
          email:
              from_email:
                  address:        noreply@siteemail.co.uk
                  sender_name:    #sender name here#
              template: emails/password_reset.html.twig
  </code></pre>
  
  <p>Symfony 3.1 / FOS User Bundle 2.0
  Any help is appreciated.</p>