Home

Issue: 1452

App freezing after middleware

[issue link]

Hi, I have this auth middleware:

export default function ({store, redirect, route}) {
  if (route.path === '/auth/verify' || route.path === '/auth/signup' || route.path === '/auth/password') {
    return
  } else if (!store.getters.loggedUser && !store.getters.bridgeCrossed) {
    return redirect('/bridge')
  }
}

So, bridge is the site where i’m checking that user is logged and redirecting towards. But for some paths, routs i don’t need, want to do this; as above. Don’t know why, but when i’m loading app directly on these routs after some $router redirect action - simple nuxt-link app is freezing. When i’m navigating to these sites from other it works fine… I guess this is because this return, but how to do this otherwise?

Thanks for help.

This question is available on Nuxt.js community (#c1291)