4๐
I was able to solve this problem by using the following:
- Express server โ using axios posts to manage the login on receiving
the request save the user ID in the session and save the access token
in a cookie - Vuex โ store user state so easily accessible within my Nuxt application
- Nuxt server middleware โ used to check the authentication status of
the user on the server. Looking for user ID in the session or the
access token in a cookie that would have been created on login
Access to the code containing a working, running example of this scenario can be found in this GitHub repository.
I have also written a more detailed blog entry regarding all the important files used in the project.
๐คRoss
- [Vuejs]-How can I use data from v-for list in inline css with v-bind:style?
- [Vuejs]-Vuetify โ File upload convert to base64 format
Source:stackexchange.com