---
title: "Discussion on \"Potential Dangers with Using JSON Web Tokens (JWT) For Authorization\" | Hashnode"
description: "Discussion on \"Potential Dangers with Using JSON Web Tokens (JWT) For Authorization\". Explore the structure, roles, advantages, and risks of JSON Web Tokens in authentication and authorization, with insights into implementing\ncountermeasures."
url: "https://hashnode.com/posts/potential-dangers-with-using-json-web-tokens-jwt-for-authorization/652a3348c6b744e11805eb79"
---

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

Discussion

# [Potential Dangers with Using JSON Web Tokens (JWT) For Authorization](https://blog.ethicalralph.me/potential-dangers-with-using-json-web-tokens-jwt-for-authorization?utm_source=hashnode&utm_medium=feed)

Explore the structure, roles, advantages, and risks of JSON Web Tokens in authentication and authorization, with insights into implementing countermeasures.

Oct 14, 2023 · 4 min read · blog.ethicalralph.me  
Read the article

-   [#jwt](https://hashnode.com/tag/jwt)
-   [#json-web-tokens-jwt](https://hashnode.com/tag/json-web-tokens-jwt)
-   [#authorization](https://hashnode.com/tag/authorization)
-   [#danger](https://hashnode.com/tag/danger)

## Written by

[Akinola Raphael](https://hashnode.com/@EthicalRalph)

@EthicalRalph

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

Software development

Documenting me.

## Responses 3

Markdown supported · ⌘↵ to post

[Shad Mirza](https://hashnode.com/@iamshadmirza)

[Oct 16, 2023](https://hashnode.com/posts/potential-dangers-with-using-json-web-tokens-jwt-for-authorization/652a3348c6b744e11805eb79/comment/652ccbcb835ae014e703c5cb)

Great that you have added Countermeasures as well. Very well written.

[Ebenezer Tomoye](https://hashnode.com/@Nezzar)

[Oct 14, 2023](https://hashnode.com/posts/potential-dangers-with-using-json-web-tokens-jwt-for-authorization/652a3348c6b744e11805eb79/comment/652ad196069d0e037f9a97e6)

👏

[Fawas Kareem](https://hashnode.com/@Phawazzzy)

[Oct 14, 2023](https://hashnode.com/posts/potential-dangers-with-using-json-web-tokens-jwt-for-authorization/652a3348c6b744e11805eb79/comment/652a44f4069d0e037f9a871f)

This is really a nice article🫡. I was hoping to see refresh token as one of the countermeasures. The use of refresh token This way you give the access token a short lifespan and give the refresh token a longer expiry time and maybe when the access token needs to be refreshed you also update the refresh token.

The refresh token can be encrypted as you stated in the article.

I love the relatable analogies you used.

[Akinola Raphael](https://hashnode.com/@EthicalRalph)

[Oct 14, 2023](https://hashnode.com/posts/potential-dangers-with-using-json-web-tokens-jwt-for-authorization/652a3348c6b744e11805eb79/comment/652a44f4069d0e037f9a871f#reply-652a4d06069d0e037f9a884b)

Thanks for this amazing piece [Fawas Kareem](https://hashnode.com/@Phawazzzy), indeed with refresh tokens, access tokens can have shorter lifespans, reducing the window for malicious activity.
