I am currently using an authentication middleware to check if the user is logged in or not.
If not, the user is redirected to a login page.
My problem is that I want to save the current route (before the redirect) so that I can send the user back to the page they were trying to get before the redirect. Now, the redirect method seems to reset the store, I've tried this with multiple middleware. Is there any other way I can redirect the user to the login page that won't reset the store ? I can't seem to be able to access the router with
this.$router
or with this.$nuxt.$router
.