How to send browser token to server?

Asked

Viewed 300 times

1

How to send jwt token from browser to php server each request? Every time I study about using a token only shows how to create, not how to actually use, in the image below shows that you return the token to the server in every request, but how to do this, using PHP? enter image description here

If possible, could send an example of using the token!

1 answer

1

I use the satellizer who does this for me, nor do I care where I should save or not. He sends the token JWT to the server, and save the token in the browser.

Follow the link: Satellizer

  • I’ll take a look, thank you very much!

  • You can only use the token with a SPA?

  • No, you can take the token returned from the API and save in the browser (localhistory) for example.

  • And how I send to the server to authenticate every time I change page?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.