Skip to content

thoughtworks-jumpstart/examples-with-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples with JWT

In this example project we explore ways we can send a token to the client.

Getting started

Install all dependencies

npm install

Start the server

npm run start

Sending tokens via response body

Visit the route /send/token/1 using an API client like Insomnia or Postman.

In this example, we sign a jwt token and send it to the client in the response body.

Now go to receive/token/1 to give the token back to the server. You will need to add the token in the Bearer Token in your request headers.

Send tokens via cookies

Visit the route /send/token/2 using an API client like Insomnia or Postman.

In this example, we sign a jwt token and send it to the client in the cookies.

Now go to receive/token/2. Note that you don't have to do any additional steps. The cookies are sent automatically in your request.

About

Examples with JWT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published