The Overflow Blog Founder vs Investor: What VCs are really looking for. I'm using Vue 2.3.3 and Vue Router 2.3.1. vue.js authorization router middleware or ask your own question. In this lesson, well learn how to create authentication middleware by using route guards and meta fields. When I navigate to the profile view, I expect the view to change and the query token to stay, e.g. Other possible return values described in the vue-router docs may work but there may be breaking. Get data from API via locale, id and token Route middleware run within the Vue part of your Nuxt app. Path : '/:locale/:id', // /:locale/:id?token didn't work Respecting the conventions of our API, I specified the token as a query parameter within my main parent route.Ĭoming from the existing Angular's UI router implementation I thought this is the way to go: // main.js 2,380 2 2 gold badges 19 19 silver badges 28 28 bronze badges. The application always needs to authenticate an user by locale, id and token before entering any views. I'm rewriting an existing Angular 1 application with Vue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |