---
title: "Discussion on \"Securing your JSON Web Tokens the correct way.\" | Hashnode"
description: "Discussion on \"Securing your JSON Web Tokens the correct way.\". What is a JSON Web Token and how does it work?\nJSON Web Token is a very popular method of keeping sessions in web applications. The flow of implementation is simple and straightforward. However, are your JSON Web Tokens really secured? Are your paylo..."
url: "https://hashnode.com/posts/securing-your-json-web-tokens-the-correct-way/60d87156cb0aa8118c23cab4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Securing your JSON Web Tokens the correct way.](https://taiwodevlab.hashnode.dev/securing-your-json-web-tokens-the-correct-way?utm_source=hashnode&utm_medium=feed)

What is a JSON Web Token and how does it work? JSON Web Token is a very popular method of keeping sessions in web applications. The flow of implementation is simple and straightforward. However, are your JSON Web Tokens really secured? Are your paylo...

Jun 27, 2021 · 5 min read · taiwodevlab.hashnode.dev  
Read the article

-   [#jwt](https://hashnode.com/tag/jwt)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#security](https://hashnode.com/tag/security)
-   [#authentication](https://hashnode.com/tag/authentication)

## Written by

[Taiwo Hassan Yusuf](https://hashnode.com/@TaiwoHY)

@TaiwoHY · Nigeria

  
[View profile](https://hashnode.com/@TaiwoHY)

Software Developer

I am a Software developer with a love for OpenSource, Networking, Cloud and electronics. I work at Grace Health. I am proficient as a Backend Engineer with the following Languages: NodeJS, Typescript, GoLang, Python. Cloud services: Heroku, AWS, Azure

## Responses 2

Markdown supported · ⌘↵ to post

[Rajakumar](https://hashnode.com/@rajakumar)

[Jun 28, 2021](https://hashnode.com/posts/securing-your-json-web-tokens-the-correct-way/60d87156cb0aa8118c23cab4/comment/60d9676468364a2e7b2cd8f1)

Great article, thanks for sharing.

[Abdullah Oladipo](https://hashnode.com/@abdulloooh)

[Jun 27, 2021](https://hashnode.com/posts/securing-your-json-web-tokens-the-correct-way/60d87156cb0aa8118c23cab4/comment/60d87be4de92ef110afdf4b2)

Nice article Taiwo, thanks for sharing. This however begs the question why do you want to encrypt your jwt since at the end of the day, you're sending it to the Frontend (unless it's for server to server communication).

One major catch for jwt is do they can be decrypted on the client side and the data displayed to the user or used for some basic controls.

When you encrypt that, you will have to share the encryption key with the frontend which makes it unsafe anymore.

What is your thought on this?

[Taiwo Hassan Yusuf](https://hashnode.com/@TaiwoHY)

[Jun 27, 2021](https://hashnode.com/posts/securing-your-json-web-tokens-the-correct-way/60d87156cb0aa8118c23cab4/comment/60d87be4de92ef110afdf4b2#reply-60d89fdade92ef110afdf7b9)

Thanks for reading.

Concerning the need to encrypt ones JWT, I believe there is no right or wrong answer as it can be platform and developer specific. However, if anyone chooses to encrypt their JWTs, it is only natural that they give an alternative source of the information that would be otherwise extracted from the JWT.  
To conclude, too little security is always more of a concern than too much. In the case where there is no need for the front-end to decode the JWT for any information, I believe there is no such thing as too much security. Thanks

[Abdullah Oladipo](https://hashnode.com/@abdulloooh)

[Jun 27, 2021](https://hashnode.com/posts/securing-your-json-web-tokens-the-correct-way/60d87156cb0aa8118c23cab4/comment/60d87be4de92ef110afdf4b2#reply-60d8bae1cb0aa8118c23d113)

[Taiwo Hassan Yusuf](https://hashnode.com/@TeeHazzan) Got it!
