title: Vue router Guard exclude to path with token
body: <p>I have implemented verification email in my app. After signup the user gets an url to verify email such as:</p>
  
  <pre><code>http://localhost:8080/verify_email/xdGCmMGz6LrBv0s_97gDvQ
  </code></pre>
  
  <p>I have a Router Guard in place with this condition:</p>
  
  <pre><code>else if (store.state.signedIn &amp;&amp; !store.state.currentUser.email_confirmed &amp;&amp; to.path !== '/warning_verify_email' &amp;&amp; to.path !== '/verify_email/:token') next('/warning_verify_email')
  </code></pre>
  
  <p>route /warning_verify_email is a component the just gives a warning to check email and verify before proceeding.</p>
  
  <p>The problem I am having is:</p>
  
  <pre><code>to.path !== '/verify_email/:token'
  </code></pre>
  
  <p>which should not make</p>
  
  <pre><code>http://localhost:8080/verify_email/xdGCmMGz6LrBv0s_97gDvQ
  </code></pre>
  
  <p>redirect to</p>
  
  <pre><code>/warning_verify_email
  </code></pre>
  
  <p>But it does.</p>
  
  <p>In routes, <code>path: '/verify_email/:token'</code> works. So I was assuming it would have worked in the guard too. But it doesn't.</p>
  
  <p>How can I fix?</p>