---
title: "Discussion on \"Using JSON Web Tokens for authentication in NodeJS\" | Hashnode"
description: "Discussion on \"Using JSON Web Tokens for authentication in NodeJS\". When we are creating a website that requires user authentication and authorization and then only show the protected data to the user there are several ways to do that. \n1) Local Storage\n2) Session Storage\n3) HttpOnly Cookies\nFirstly we have to create..."
url: "https://hashnode.com/posts/using-json-web-tokens-for-authentication-in-nodejs/62bf2f18ccecfb25bbc70ff8"
---

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

Discussion

# [Using JSON Web Tokens for authentication in NodeJS](https://developer20.hashnode.dev/using-json-web-tokens-for-authentication-in-nodejs?utm_source=hashnode&utm_medium=feed)

When we are creating a website that requires user authentication and authorization and then only show the protected data to the user there are several ways to do that. 1) Local Storage 2) Session Storage 3) HttpOnly Cookies Firstly we have to create...

Jul 1, 2022 · 3 min read · developer20.hashnode.dev  
Read the article

-   [#jsonwebtoken](https://hashnode.com/tag/jsonwebtoken)
-   [#authentication](https://hashnode.com/tag/authentication)
-   [#authorization](https://hashnode.com/tag/authorization)
-   [#cookies](https://hashnode.com/tag/cookies)
-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[Naman Verma](https://hashnode.com/@namanv08)

@namanv08

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
