24 thoughts to “Vue 3 Authentication with JWT, Vuex, Axios and Vue Router”

  1. This is very useful content thank you for sharing it with us. Also is there a tutorial about using refresh tokens in the Vue3 application. Also, using HTTP only cookies to store JWT.

  2. Many thanks for this excellent tutorial. Would be nice to see a similar example using the Vue 3 Composition API.

  3. Thank you very much for this great tutorial!
    Very clear and well described, However I have one concern, do you think that importing UserService directly into Home.vue component is the best practice?

    Wouldn’t it be better if we let Vuex to interact with the UserService as we did for the AuthService?

    I mean creating a user.js module in store same we as we create auth.js and then from Home.vue (or any other component) to dispatch to the actions in user.js module.

    1. Hi, UserService (in this tutorial, just like a data service) is an example which indicates that we don’t need to put everything in the store 🙂
      Generally we use Vuex store when we need the same data at two completely different places in our application. This is the point Vuex makes a lot of sense.

  4. Your way of describing all in this tutorial is genuinely good, all be able to without difficulty understand it, Thanks a lot.

  5. I really like studying your tutorial.
    Keep up the good work! You know, a lot of individuals are looking around for this Vue 3 tutorial, you could help them greatly.

Leave a Reply

Your email address will not be published. Required fields are marked *