H
H
hckn2018-09-15 14:17:52
Vue.js
hckn, 2018-09-15 14:17:52

Why generate sessions with Nuxtom?

In the Nuxt authorization example, we use Nuxt programmatically and we generate sessions on the Nuxt side - https://nuxtjs.org/examples/auth-routes
Why? For example, in my case, I have a separate API server that sends data, and it also manages sessions. Why do I need to transfer sessions to Nuxt - and most importantly, how can I then link them to my API server?
I correctly understood, the only thing for which it is needed - to render private data on the server and give it to an authorized user? Then another question comes up - why should I render this, if I can more easily and safely send this data to an authorized user already on the client. What are the advantages of these whistles?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Mosin, 2018-11-13
@c_i_h

In this example, sessions are generated on the server side, in express.js.
And in general, an example that you can generate sessions and fill the storage at the stage of server rendering using the nuxtServerInit action.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question