No video

JWT RSA signing and verify in Node.js using RSA Public/Private Key Pairs

  Рет қаралды 12,790

Techno Saviour

Techno Saviour

Күн бұрын

#jwt #node #rsa #asymmetricencryption #piblicprivatekey
Learn how to do use JWT with RSA public and private keys in Nodejs
This is a code walkthrough. to understand why and when to use RSA please watch the previous video in the playlist.
Amazon Link: amzn.to/36pZN09
git: github.com/luc...
Nodejs: nodejs.org/en/...
npm package: www.npmjs.com/...
Visual studio code: code.visualstu...
Playlist about JWT
• JWT Token
Check out the playlist about RSA
• RSA

Пікірлер: 17
@bitorsic
@bitorsic Жыл бұрын
You're indeed a saviour. Thank you. Looking forward to implement this in my projects. Great content
@AmarSingh-uw1db
@AmarSingh-uw1db 3 жыл бұрын
Awsome video. Great explanation. I have a doubt that It makes any difference that we use RSA or any other algorithm for sign tokens or no algorithm for security purpose ?
@biswakalyandas8076
@biswakalyandas8076 Жыл бұрын
In a scenario where you want other sites to validate your sites JWT token but you dont want them to generate new token on your behalf. This will be helpful
@dinkarinjosh
@dinkarinjosh 2 жыл бұрын
Great Tutorial. Can you please help ? Your code works, but when I use my key pair, it does not, how did you generate the pub/private keys? I tried both git bash -> ssh-keygen -t "ed25519" AND rsa . Please help. but a kudos, best explanation out there.
@cristianhoyos4767
@cristianhoyos4767 4 жыл бұрын
I have a question here. According to the way you are doing this I think is not correct, but maybe I'm bad with my assumption. Shouldn't we generate (sign) the JWT with public key instead of private key? and shouldn't we use the private key for verifying it instead of public key?
@TechnoSaviour
@TechnoSaviour 4 жыл бұрын
In JWT singing is done with private key only. This process occurs at server end so your private key remains secure. If the client wants to verify the token the server can expose the public key so the client side can also verify the token.
@harshmittal3072
@harshmittal3072 Жыл бұрын
@@TechnoSaviour Under RSA encryption, messages are encrypted with a code called a public key, which can be shared openly. Due to some distinct mathematical properties of the RSA algorithm, once a message has been encrypted with the public key, it can only be decrypted by another key, known as the private key. Each RSA user has a key pair consisting of their public and private keys. As the name suggests, the private key must be kept secret.
@harshmittal3072
@harshmittal3072 Жыл бұрын
THIS is what many blogs say about RSA
@bitorsic
@bitorsic Жыл бұрын
@@harshmittal3072 Signing is different from Encryption, although both use a key-pair generated by RSA. Both differ in the objective: Assume Alice uses her key-pair for the examples Encryption - The objective is to protect the data. Let's say Bob 'encrypts' a message using Alice's public key. This allows only Alice to read the data (using her private key), but there's no way to verify that it was indeed Bob who encrypted the data, or the source of the data, since anyone can use Alice's public key. Signing - The objective is to verify the source of the data. Let's say Alice 'signs' a message using her own private key. This allows anyone to verify that this data was indeed from Alice (using her public key), but there's no way to protect the data, since, again, anyone can use Alice's public key. Hope this explanation helps. You can read more about this at www.encryptionconsulting.com/education-center/encryption-and-signing#:~:text=Encryption%20uses%20a%20key%20to,of%20encryption%20in%20its%20process
@johnreyeslaynes3273
@johnreyeslaynes3273 3 жыл бұрын
In web api net core and angular?
@jimcopeland4011
@jimcopeland4011 2 жыл бұрын
Uncaught ReferenceError ReferenceError: Cannot access 'fs' before initialization
@xavierinuca2348
@xavierinuca2348 3 жыл бұрын
You can help me, Im using express server, and I want to do a middleware!!
@abcxyz8635
@abcxyz8635 3 жыл бұрын
I got the error JsonWebTokenError: invalid algorithm
@seifeslimene
@seifeslimene 3 жыл бұрын
You have to specify the algorithm
@swoldetsadick
@swoldetsadick 3 жыл бұрын
Ialso get an error. But it says JsonWebTokenError: invalid signature
@jpbl2418
@jpbl2418 3 жыл бұрын
Same for me
@swoldetsadick
@swoldetsadick 3 жыл бұрын
@@jpbl2418 I realized later that my public and private key did not match. No idea why. Had to regenerate.
How to use JWT with RSA key-pair in micro-services. (JWKS.JSON)
40:05
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 27 МЛН
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 29 МЛН
The Joker kisses Harley Quinn underwater!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 16 МЛН
JWT Authentication Tutorial - Node.js
27:36
Web Dev Simplified
Рет қаралды 1 МЛН
7 Cryptography Concepts EVERY Developer Should Know
11:55
Fireship
Рет қаралды 1,3 МЛН
Google Pixel 9 Pro XL TEARDOWN - (turn back while you still can)
8:45
JerryRigEverything
Рет қаралды 83 М.
What makes JSON Web Tokens (JWT) secure?
34:04
Hasgeek TV
Рет қаралды 41 М.
JSON Web Token Hacking
6:30
Loi Liang Yang
Рет қаралды 83 М.
Learn JWT in 10 Minutes with Express, Node, and Cookie Parser
10:20
Web Dev Cody
Рет қаралды 107 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 27 МЛН