title: How to add a redirection in Nuxt router middleware?
body: <p>I have created a middleware to check if new user email has been verified <code>middleware/verify_email.js</code>:</p>
  <pre><code>export default function (context) {
    if (context.$auth.loggedIn &amp;&amp; !context.$auth.user.email_verified_at) {
      console.log('logged in with email not verified');
      return context.redirect('/auth/verify');
    }
  }
  </code></pre>
  <p>Then, I have set this middlware globally in <code>nuxt.config.js</code>:</p>
  <pre><code>  router: {
      middleware: ['auth', 'verify_email']
    },
  </code></pre>
  <p>But it seems I'm getting an infinite loop, the page in not not responding. It responds again as soon as I comment the redirect line.</p>
  <blockquote>
  <p>NavigationDuplicated: Avoided redundant navigation to current location: &quot;/auth/verify&quot;.</p>
  </blockquote>
  <p>I probably need to add an exception to this middleware for the page <code>auth/verify</code> but I can't figure out how.</p>
  <p>Any idea how I should fix this issue ?</p>