Token vs Session Authentication | Authentication Explained!!!

preview_player
Показать описание
Hey Everyone, I am Piyush Garg, and in this video, we are going to discuss authentication. What is authentication and what are two types of authentication that are available out there.
We are also going to see the comparison between JWT-based authentication and Session-based authentication.

Featured Playlists

Social Links

Video Titles
What is Authentication?
What is JWT?
What is a Session?
Difference between session and token authentication.
Difference between Stateful and Stateless authentication.

Tags
- Authentication
- JSON Web Tokens
- Sessions
- Cookies

Hashtags
#authentication #auth0 #session #coding #programming #nodejs #serverless #systemdesign
Рекомендации по теме
Комментарии
Автор

Interesting video. I do have a couple of questions though. The arguement of being token stolen seems like an unfair one since that could happen to cookies as well. Though there are some scenarios where sessions aren't just a valid answer for example mobile apps. Usually in mobile apps you can't really rely on sessions being persisted and can't expect the users to login in over and over again. On the other hand session based authentication works really well for the web apps. Ofcourse if you work in development professionally, you will need to implement both a lot of times with consistent behaviour. This is a good introduction for beginners though but it would be great if it was mentioned that there were more advanced forms of authentication methods and links to the documentation would have been a massive plus.

the-white-fang
Автор

Great explanation Piyush, I am thrilled to see this video because you explained it more clearly and easily understandable 👏

vishalpable
Автор

Awesome explanation..
One of the best video I ever seen for token and sessions..

parikshitjagtap
Автор

I love your teaching style. One thing if you add to make it cherry on the top is show real life examples

himankshu
Автор

Bhai you deserve many more subscribers.

Such a simple yet comprehensive explanation.

yatendraupadhyay
Автор

I am saying this very honestly.. what a explanation!🔥🔥

ashishsng
Автор

Very Effective explanation. but does server stores the secret key string in its database and the respective hash function, that means its still using memory for decoding the specific user from the token? i don't understand how can it be a advantage.

muditkhanna
Автор

I think for improving security we can save the jwt token in cookies instead of local storage.

roshanshah
Автор

But token can only be generated when credentials are correct and it can only be leaked from user itself 🤔

devlo
Автор

very helpful video and love your way of making any question easy to understand.

dharamved
Автор

Piyush sir thanks for this detailed explanation. It would be great if you could explain how to overcome drawback of jwt what's the solution for it

harshshah
Автор

serverless can be durable as well, such as azure durable functions

utsavkumar
Автор

Perfectly explained, love from Pakistan

haristallat
Автор

Finally understood it. Thanks to you brother ✨❤

ombhandari
Автор

i think we can store session in DB itself with its life, to avoid re run of server issue

farhanali
Автор

Great, Have a question, How do we invalidate JWT in serverless environment..

ErLakhan
Автор

Can u pls make a video explaining how are sessions and jwts are practically implemented and wat is done to handle their flaws.

mm-et