S
S
Sergey Semenov2018-04-23 23:22:31
Node.js
Sergey Semenov, 2018-04-23 23:22:31

Session in vuejs & nodejs how to bind?

SPA client application + using vuex
server on nodejs + express
MySQL database
using login and password authentication.
When authenticating from the client, the server is given a login and password, the server checks and attaches the identifier
req.session.id_user = user.id;
After another request to the server, in the session id_user = undefined.
How to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2018-04-23
@kulakoff Vue.js

Check that you have set permissions on the client to send session data. Should be something like this:
Vue.http.options.credentials = true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question