D
D
Dmitry Petrik2017-08-22 08:46:46
JavaScript
Dmitry Petrik, 2017-08-22 08:46:46

How to save session in nuxt (vue + nodejs)?

I use Nuxt.js framework for website development. In fact, this is such a hybrid of vue and nodejs with server rendering. The problem is that after user authorization, if you refresh the browser page through f5, then the session flies, and you need to log in to the site again. I did everything according to this guide https://ru.nuxtjs.org/examples/auth-routes . However, when I check what arrives at the nuxtServerInit storage action, req.session is undefined. After authorization, req.session is filled with user data as it should, but everything is reset to zero after refreshing the browser page
Maybe someone has come across something similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Klein Maximus, 2017-08-22
@kleinmaximus

Is there a middleware installed on the express side that handles sessions and cookies?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question