C
C
copal2015-12-28 14:45:13
PHP
copal, 2015-12-28 14:45:13

How to properly create authentication with jwt?

There are doubts that I did not fully understand the topic with jwt. It is advised to use it instead of cookies, but how then does the site render for an authorized client? If you do not consider spa, and if you consider it, then only with a pre-render on the server, then how can the server know that the page needs to be rendered for an authorized user?
And if it is still stored in cookies, then what data is stored in the token that the client needs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2015-12-28
@maxloyko

Token - a unique hash that goes along with the headers. It is accepted by your backend and thus knows what to give to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question