---
title: "Discussion on \"Learn all about JWT Nodejs Authentication in simple way\" | Hashnode"
description: "Discussion on \"Learn all about JWT Nodejs Authentication in simple way\". Hey!!\nLet's start the learning process in easy way without wasting time \n\n1. Difference between Authentication and Authorization??\nBefore moving on, let's first understand the difference between Authentication and Authorization\n\nBoth Authentication a..."
url: "https://hashnode.com/posts/learn-all-about-jwt-nodejs-authentication-in-simple-way/61274a4d71cb04254f06cc30"
---

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

Discussion

# [Learn all about JWT Nodejs Authentication in simple way](https://anubhavg.hashnode.dev/learn-all-about-jwt-nodejs-authentication-in-simple-way?utm_source=hashnode&utm_medium=feed)

Hey!! Let's start the learning process in easy way without wasting time 1. Difference between Authentication and Authorization?? Before moving on, let's first understand the difference between Authentication and Authorization Both Authentication a...

Aug 26, 2021 · 4 min read · anubhavg.hashnode.dev  
Updated Sep 3, 2021  
Read the article

-   [#hashnode](https://hashnode.com/tag/hashnode)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#jwt](https://hashnode.com/tag/jwt)
-   [#github](https://hashnode.com/tag/github)

## Written by

[Anubhav Goyal](https://hashnode.com/@DarkStorm)

@DarkStorm

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

R&D Engineer @ Samsung India

I'm a coder, blogger, developer &amp; learner ⚡ Currently working as R&amp;D Engineer at Samsung India ⚡ Always passionate to write logic ⚡ I do problem solving and loves to do competitive programming ⚡ Self-taught full stack developer who likes to write clean &amp; well-tested JS code ⚡ I have good knowledge of Data Structures and Algorithms and always learning them to make it more strong. ⚡ Loves to play badminton and to explore new things ⚡ Writes technical blogs ⚡ Where to read my blogs: https://anubhavg.hashnode.dev ⚡ About me: https://anubhavg-portfolio.netlify.app ⚡ How to reach me: anubhav1408sks@gmail.com

## Responses 1

Markdown supported · ⌘↵ to post

[Mohanish Saim](https://hashnode.com/@mohanish)

[Jan 18, 2022](https://hashnode.com/posts/learn-all-about-jwt-nodejs-authentication-in-simple-way/61274a4d71cb04254f06cc30/comment/61e6b246be5d7633af87d6ac)

But how that " process.env.TOKEN\_HEADER\_KEY " stores token in .env file which is generated by jwt.sign()

[Anubhav Goyal](https://hashnode.com/@DarkStorm)

[Mar 6, 2022](https://hashnode.com/posts/learn-all-about-jwt-nodejs-authentication-in-simple-way/61274a4d71cb04254f06cc30/comment/61e6b246be5d7633af87d6ac#reply-6224c8e7ecb2d35f765e4571)

Hi Mohanish, .env file is used to store sensitive information which can't be made public.

To store data in .env file, the format is TOKEN\_HEADER\_KEY=authtokenheaderkey

and through process.env.TOKEN\_HEADER\_KEY, we can access header key.
