DEV Community

Cover image for Cookies-Based Authentication Vs Session-Based Authentication

Cookies-Based Authentication Vs Session-Based Authentication

Emmanuel C. Okolie on March 17, 2023

Introduction If There’s one thing I would like to know previously, it is the entire way Authentication works, session authentication and...
Collapse
 
fa1d79909e67 profile image
Antonio Cota

I think the article is misleading. Maybe you wanted to highlight the different between session-based vs token-based authentication?
What is the different between the following sentences?

  • The server generates a fresh session ID and links it to the user's account each time they log in. The user's browser then receives this session ID as a cookie, which is saved on the user's device.
  • A cookie with a special identifier linked to the user's account is created by the website when a user checks in. The user's device then receives and stores this cookie in their browser.

In addition you suggest "Cookies-based authentication involves putting authentication data in a cookie that is saved on the user's browser, including their login credentials." which is something quite scary promoting to store login credentials in a browser cookie.

Collapse
 
emmykolic profile image
Emmanuel C. Okolie

Hello sir, I wish I understood where you're driving!

Honestly, I'd love you to explain better. cause everything there is correct .
Thanks! I'm waiting

Collapse
 
kontsaki profile image
Konstantinos Tsakiltzidis

I agree, the article looks like complete AI slop. The author does not seem to know what he is talking about. Sadly this is another reason that dev.to is very unreliable for any kind of professional information.

Collapse
 
rribeiro200 profile image
Rafael Ribeiro

Spectacular article Emmanuel! Thanks for sharing. Congratulations and success on your journey!

Collapse
 
emmykolic profile image
Emmanuel C. Okolie

Thanks 😁 man.
I pray 🙏 for more insightful content

Collapse
 
tahara352 profile image
Tahara Kazuki

Today, I learnt about session and cookie in more detail thru this post.
This is better text to understand session and cookie.
Please continue to post good text like this.
Thanks!

Collapse
 
emmykolic profile image
Emmanuel C. Okolie

You're most welcome.
I thank God my post was of value to you!
I'm most grateful!
Follow me for more tutorials like this!

Collapse
 
abhishek_kumar_9991a6fa2e profile image
Abhishek Kumar

Java

Collapse
 
emmykolic profile image
Emmanuel C. Okolie

I don't understand your comment

Collapse
 
abhishek_kumar_9991a6fa2e profile image
Abhishek Kumar

Javascript

Collapse
 
emmykolic profile image
Emmanuel C. Okolie

I don't understand your comment.