M
M
Mark Ouspensky2018-07-16 01:16:43
JavaScript
Mark Ouspensky, 2018-07-16 01:16:43

Where to store JWT token in isomorphic application?

Hello.
Previously, the JWT token was always stored in localStorage, and when entering the site, depending on whether the token exists or not, it is redirected to the authorization page.
But what about server rendering? Where to save the token?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
profesor08, 2018-07-16
@dournesh

In cookies, for example, or in a session, or in some analogue of all this.

I
Ilya, 2018-07-16
@ilyapashkov02

Better put in cookies)

A
Anubis, 2018-07-16
@Anubis

I'm just wondering.
Usually server rendering is used for search engine optimization purposes. That is, they give out public pages available to any guest of the site. Why do you need to feed search bots some kind of authorization data?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question