J
J
John-Galt2017-10-03 21:05:12
PHP
John-Galt, 2017-10-03 21:05:12

How to pass jwt token from browser to server when opening page in browser?

How to pass jwt token from browser to server when opening page in browser?
And where is it better to store the jwt token on the browser side?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pushkarev, 2017-10-03
@AXP-dev

Well it is the best of all to store it in session. But you can also use cookies

A
Alexander Aksentiev, 2017-10-03
@Sanasol

when the page is opened, the token only arrives in the browser, if it has not been sent before, then it still needs to be received.
And it is necessary to transfer with ajax / api requests in the header or somewhere else.
Not when opening the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question