💥 Cookies and JWT - How To Combine Them? Creating a JWT-based User Session

  Рет қаралды 17,667

Angular University

Angular University

Күн бұрын

Пікірлер: 4
@AngularUniversity
@AngularUniversity 7 жыл бұрын
In this video (part of the Angular Secuirty course angular-university.io/course/angular-security-course), we will learn how to build a JWT-based User Session, and how to send it back to the client. In this particular case we are running the Authentication server and the application server on the same domain, so we will be using a secure and HTTP Only cookie to store the JWT. Later in this course we will learn how to add XSRF defenses to the application, to prevent request forgery attacks.
@shuk
@shuk 6 жыл бұрын
Hi, I have followed this guide in my development environment, but this failed during production as I had to switch the proxy mechanism to a CORS one. Do you have a working implementation of this using CORS?
@JanKowalski-kh9nl
@JanKowalski-kh9nl 5 жыл бұрын
How does protection against CSRF work if you keep JWT in cookies? If the attacker's website has HTTPS, will it automatically send a cookie from JWT and the server will successfully authenticate the request from the attacker's site?
@Dfeneck
@Dfeneck 2 жыл бұрын
3 years ago, I'm sure you know the answer by now but I'll answer (very) briefly for others: JWT's are signed with a private key by the authentication server as its generated. The JWT has a copy of the resulting public key (its footer section). On authentication, when you pass the JWT to your secure server, it will verify the JWT matches the stored public key still, if it doesn't the JWT has been modified and thus is rejected.
💥 Understanding CSRF (aka XSRF) - Step-by-Step Attack Simulation
9:35
Angular University
Рет қаралды 37 М.
Difference between cookies, session and tokens
11:53
Valentin Despa
Рет қаралды 660 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 6 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 104 МЛН
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 271 М.
Angular Mistakes #6: 🛑 STOP Overusing Centralized Stores
20:20
Angular University
Рет қаралды 6 М.
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,2 МЛН
Node.js API Authentication With JWT
23:01
Traversy Media
Рет қаралды 558 М.