Тёмный
No video :(

SameSite Cookie Attribute Explained by Example (Strict, Lax, None & No SameSite) 

Hussein Nasser
Подписаться 424 тыс.
Просмотров 69 тыс.
50% 1

Опубликовано:

 

25 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 123   
@hnasr
@hnasr 6 месяцев назад
google has started deprecating Third party cookies (samesite=none essentially) in 2024. You might be among the 1% experiment. that might explain why it's working anymore. I wrote about this here and left resources too. medium.com/@hnasr/google-is-deprecating-3rd-party-cookies-d987603607a7
@ammakr
@ammakr 6 месяцев назад
Yeah, I just noticed. I have a web application in nextjs and django. It's working fine on Firefox and GNOME Web (a.k.a. Safari lol), but it's authentication stopped working on Chromium (cookies aren't being set). Thanks man!
@williambattle5068
@williambattle5068 2 года назад
Thanks a bunch - just what I needed! I found the explanation in a lot of places but the visuals really clarified it for me.
@gagangupta1255
@gagangupta1255 4 года назад
Hussein go bless for explaining this feature so nicely. Even after reading/watching 10's of video - the concept was not clear. Seriously you did a great job explaining it so easily with a practical example
@hnasr
@hnasr 4 года назад
Gagan Gupta Hi Gogan! I am happy the video helped 😊 have a great day
@iamboltzmann412
@iamboltzmann412 2 месяца назад
Thanks a lot brother, I recently made a new website and the front end and backend are hosted on two different services, I was breaking my head over why the browser was not sending cookies. This explains why. I guess I have to use some other way, since google deprecated cross site cookies
@vicky2118
@vicky2118 3 года назад
Finally I understood this concept... Thanks for this great explanation 👍
@hnasr
@hnasr 3 года назад
❤️
@ashish_gupta307
@ashish_gupta307 2 года назад
I checked for this topic on many channels but got it clear from here.....thanks hussein.
@JiyOnFire-vg4xx
@JiyOnFire-vg4xx 10 месяцев назад
Thank u sooo much sir. I was searching for it the whole day but I didn't understand before u explained it. It's really precious
@namangupta1817
@namangupta1817 3 года назад
That excitement level for domain name 😂😂😂😂😂
@rotemgalea7156
@rotemgalea7156 Год назад
thanks god! I learned this in collage that i paid a lot of money. and now it the first time i really understand this issu . thank you
@justcoding2491
@justcoding2491 2 года назад
Very well explained in detail with good example ❤️👍🏻
@_dinesh
@_dinesh 4 года назад
This is how you explain things!!!!! Thank you so much 🙏🙏🙏. Google Chrome team should use this as their office video because their video is just a crap.
@shuaiqingluo4400
@shuaiqingluo4400 6 месяцев назад
this is an excellent video explaining the same-site policy of cookies!
@thalyssonleite1479
@thalyssonleite1479 2 года назад
Thank you! It's very clear now what that cookie with sameSite do
@isbemorph
@isbemorph Год назад
Node would throw a typo. But samesite or SameSite works fine..
@samnayakawadi
@samnayakawadi 10 месяцев назад
Subscribed. ChatGPT failed to explain this concept. Thanks dude.
@shadmanfatin777
@shadmanfatin777 Год назад
Amazing explanation. Thank you Nasser sir.
@AUBCodeII
@AUBCodeII Год назад
Thanks for making a clear explanation of SameSite!
@MrMonishSoni
@MrMonishSoni Год назад
Best video for samesite Attribute (Cookies)
@rohandvivedi
@rohandvivedi 3 года назад
This is one of the best illustration for the usage of samesite. thanks
@hnasr
@hnasr 3 года назад
Rohan Dvivedi thanks Rohan
@thoriq_aulia
@thoriq_aulia 2 года назад
Finally I understand about sameSite parameter, Thx man you save the day
@nitinverma7419
@nitinverma7419 3 месяца назад
Thanks brother, You saved a lot of time for me :)
@Ravi.Benedetti
@Ravi.Benedetti 4 года назад
Thank you sir. You are a gentleman and a scholar.
@johannsebastianbach3411
@johannsebastianbach3411 3 года назад
Is that a Norm joke by any chance? :D
@g-luu
@g-luu 4 года назад
Superior content as always.
@hnasr
@hnasr 4 года назад
Thanks Bryan !
@ebaduddin2624
@ebaduddin2624 3 года назад
beautifully explained..thanks
@alexeicodes
@alexeicodes Год назад
The best explanation i love it so much
@supa1009
@supa1009 4 года назад
haha thanks for the tutorial and positive energy :D
@roman_mf
@roman_mf Год назад
Beautifully visualized!
@ashherali7613
@ashherali7613 10 месяцев назад
nice explanation keep it up dude
@user-qb1yq6ji2o
@user-qb1yq6ji2o 8 месяцев назад
Thank you for the information. It was really useful.
@user-mu5il5in3g
@user-mu5il5in3g 10 месяцев назад
Amazing explaination !! thanks a ton!!!
@channaly2772
@channaly2772 Год назад
Great example! Many thanks
@kumaravelrajan
@kumaravelrajan Год назад
Excellent presentation. Thank you 😁
@yaseralamoodi8314
@yaseralamoodi8314 4 года назад
Thank brother I really appreciate your work and get a lot of experience from you, my question is isn't cookies shloud just work for the same domain?، I mean it shouldn't be exists if you open a new tab for another domain
@hnasr
@hnasr 4 года назад
Correct ! Cookie are domain specific, but 3rd party cookies were invented for tracking purposes
@pedrosampaio8293
@pedrosampaio8293 3 года назад
Brilliant explanation!!!
@mrstatler
@mrstatler 4 месяца назад
Still don't know why there's cookie for the second site referencing image from the first one when both are open in chrome. But when one is open in chrome & 2nd in fox it doesn't seem to work.
@QuranKareem22
@QuranKareem22 8 месяцев назад
good explanation thanks!
@matthewespindola3694
@matthewespindola3694 3 года назад
Wow, you are great man. What a perfect explanation. Thanks!
@DevAmirull
@DevAmirull Год назад
What a perfect explanation. Thanks.
@thalyssonleite1479
@thalyssonleite1479 2 года назад
Greetings from Brazil!
@surajbhushanpandey2882
@surajbhushanpandey2882 2 года назад
Nice work @ Hussein
@hamin.gh.
@hamin.gh. 2 года назад
Great Explanation. Thank you.
@raminiskandarov
@raminiskandarov 2 года назад
Thanks for this perfect explanation. just perfect
@MedoMedo-op3em
@MedoMedo-op3em 3 года назад
BRILLIANT !!
@ismaillachhab741
@ismaillachhab741 2 года назад
Good explanation , Thank you so much
@ExtraTurtle
@ExtraTurtle 8 месяцев назад
what makes the image display only with the cookie? I thought the cookie being strict means it lets you access the cookie itself from the same site only. where is the code for the img, and how do you make it follow the cookie settings?
@MrJohn360
@MrJohn360 3 года назад
Great explanation, thanks for sharing.
@nileshmonde4707
@nileshmonde4707 Год назад
Thanks for the video
@tsdineshjai8565
@tsdineshjai8565 20 дней назад
@hnasr usually when you visit a site, the server will send the cookie to the browser right. But in the video, you have mentioned several times that "Browser" will not send the cookie if it's cross site. Can you explain on this please ?
@nikhil_arora
@nikhil_arora 2 года назад
too good. thanks for this video!
@bum7006
@bum7006 3 года назад
Thanks
@aliyevruslan936
@aliyevruslan936 Год назад
@hnasr The server setup things you mentioned at ~ 1.56m, which of your video teaches such server setups? You have many videos
@nishantdalvi9470
@nishantdalvi9470 9 месяцев назад
Please some one clear my doubt, The image of one domain is getting loaded on another domain if the attribute Same-site has the value None right but what about the SOP (Same Origin Policy) ain't it gonna block the responses from cross domain ?
@saeedp92
@saeedp92 4 месяца назад
excellent thank you
@alimahboub4163
@alimahboub4163 3 года назад
That's the best explanation ever! Well done my friend. Keep it going
@dmbarry86
@dmbarry86 4 года назад
Brilliant explanation, thanks.
@hnasr
@hnasr 4 года назад
Glad it was helpful!
@birdofhermes6152
@birdofhermes6152 3 года назад
Thanks for the explanation
@manikandankm3974
@manikandankm3974 2 года назад
What if we want to make any request from Domain A through api call to fetch information from Domain B when same site = Strict ? what is the way to achieve the same
@AbhiSeSeekho
@AbhiSeSeekho 3 года назад
If same site attribute is set to lax the browser is sending the cookie then how it prevent csrf?
@jyotirmoymaschatak5960
@jyotirmoymaschatak5960 Год назад
Thanks Boss!
@techwithameer
@techwithameer 4 года назад
Thanks for this bro...
@alvin_lal
@alvin_lal 3 года назад
Thanks sir, very helpful
@allanimeworld2898
@allanimeworld2898 3 года назад
Sir please make a video on how to access cookie from other website. Means how cross-site is done. 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
@bojandanon2037
@bojandanon2037 Год назад
Very nice 👍
@desarrolladorrapido8767
@desarrolladorrapido8767 4 года назад
Excellent example with IMG and A, a question, How about IFRAME and AJAX?
@hnasr
@hnasr 4 года назад
Desarrollador Rápido both are very similar to IMG. Thanks!
@desarrolladorrapido8767
@desarrolladorrapido8767 4 года назад
I see, thank you.
@glenndwiyatcita1663
@glenndwiyatcita1663 3 года назад
@@hnasr Hmm but according to owasp.org/www-community/attacks/csrf#other-http-methods, JavaScript is subject to same-origin policy. ...which means if AJAX is used to make a request from your other origin (hnasr.github.io), it won't be executed in the first place.
@quangaonguyen7898
@quangaonguyen7898 2 года назад
How do we set samesite = none?
@morganfree100
@morganfree100 2 года назад
@hussein Nasser: Does this applies to webscoket?
@mishapatel3119
@mishapatel3119 3 года назад
How Can we access the cookies in request header with httpOnly ?? Plz help i m in trouble to get these cookies in all request header
@goatslayer5957
@goatslayer5957 6 месяцев назад
Is it possible they have patched this? I can't get cross-site cookies working! I used your express file and uploaded to render. Then I also made a GitHub page with an image src pointing to the render https link, but the cookie is never sent!!
@singh.karanbir
@singh.karanbir 3 года назад
This is nice explanation But there is a room for explanation around the cookies being set while calling login api
@smartaquarius2021
@smartaquarius2021 3 года назад
Is it possible to access samesite lax cookie in case api is integrated with openid connect for single sign on. Currently why they are inaccessible because oidc url auto redirects to my api and at that time api try to read the cookies at server side. Any suggestions on this please??
@ektanawle1088
@ektanawle1088 3 года назад
Thanks for the explanation Hussein. I got one question ..if someone is using my site login page on their website then who would set the samesite : none (I as a site owner or the one who is using our login page). Could you please help me find this. I have set in my code samesite:none but when I am trying to login through their site it still showing samesite:Lax while when I login through mysite changes are reflecting as none
@ManiKandan-vo2qr
@ManiKandan-vo2qr 4 года назад
Hi , I have a small doubt . What would be the case when it is not Secure . Please let me know the behavior when both are communicating with HTTP
@petruconiuc4618
@petruconiuc4618 3 года назад
Very impressive explanation, but how do you set a cookie with a domain other than your own?
@hnasr
@hnasr 3 года назад
You can’t that is the security aspect of cookies. They are set by the owner of the domain You can set the cookie from the client side with Javascript document.cookie but still you would have injected some code to do so in someone else’s domain
@nguyenluat-gj8vx
@nguyenluat-gj8vx 4 месяца назад
thanks
@shubham_srt
@shubham_srt Год назад
Thanks :)
@vladislavgerginov748
@vladislavgerginov748 Год назад
Thanks for the great example. But how do you set these properties on a site with a drag-and-drop site builder is the real question?
@urssaf343
@urssaf343 Год назад
This is done on the backend. Drag and drop stuff is just the page that is being sent to the user.
@vladislavgerginov748
@vladislavgerginov748 Год назад
@@urssaf343 agree to that. A tutorial about how it's done on the back end will be very appreciated. Or it's too much to ask?!
@urssaf343
@urssaf343 Год назад
@@vladislavgerginov748 Lookup course from Mosh Hamedani: restful apis with express.
@iCydiaHelper19
@iCydiaHelper19 3 года назад
I am getting HTTP error 405, any advices?
@techwithameer
@techwithameer 4 года назад
I need same site mode strict but then my redirection from a payment site is not working. Is there any solution to keep it working without changing same site strict mode?
@hnasr
@hnasr 4 года назад
I think its safe to use lax for your use case since you are redirecting. I don’t know if you can use strict and still send the cookies while redirecting..
@techwithameer
@techwithameer 4 года назад
why redirection to a site not working when same site is lax but the request from another site is 'post'? will this works only for 'GET'? Iam getting issue when my my site is redirected from a payment gateway. They are redirecting using a POST request.
@hnasr
@hnasr 4 года назад
AMR K Post requests won’t send lax cookies to cross site, there is however an exception if those lax cookies are created within two minutes A SameSite Cookie Exception was made to avoid Redirect Loop in Single Sign-On (SSO) Let us Discuss ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4QiD8cvzCN0.html
@alii4334
@alii4334 2 года назад
you can keep the devtools open!
@gokusupersayiandbgt
@gokusupersayiandbgt 4 года назад
Hi, does thed same site attribute provide protection on all browsers like IE, Firefox or just chrome latest
@hnasr
@hnasr 4 года назад
nvn dnt Correct all browsers now supports it except for IE developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
@Jamie-pq9gn
@Jamie-pq9gn 3 года назад
Hi Nasser, I have a question, How is https in the video implemented? No certificate is imported in the source code.
@hnasr
@hnasr 3 года назад
Hey , I skipped that part since I explained it on other videos ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-b35Dcz91ItE.html
@Jamie-pq9gn
@Jamie-pq9gn 3 года назад
@@hnasr thank you very much 🙏
@utkuaslan701
@utkuaslan701 4 года назад
thanks!!
@MaheshBh6
@MaheshBh6 2 года назад
Stating the obvious here but this is a HTTPS only feature, so the flags won't work in any dev environments that don't have https configured
@mursalrabb6093
@mursalrabb6093 3 года назад
same-site = None useless? i'd say no. Its pretty useful during development phase when your frontend and backend are running at different ports
@ca7986
@ca7986 4 года назад
❤️
@lawfirm3843
@lawfirm3843 3 года назад
haha. master
@christymathew9035
@christymathew9035 Год назад
SUBSCRIBER ++
@omarislearning3329
@omarislearning3329 3 года назад
cmd+/
@hnasr
@hnasr 4 года назад
Still Having trouble with SameSite? Rowan from Google is willing to help one-on-one check his twitter twitter.com/rowan_m/status/1280821505757044736?s=21
@RowanMerewood
@RowanMerewood 4 года назад
Thanks, Hussein! Definitely happy to chat with people. Hearing about the issues people are having helps me in turn improve the documentation and samples too.
@FLUTTERMAD
@FLUTTERMAD 4 года назад
What if cookies are available for specified domain or path, but SameSite is Lax/None?
@RowanMerewood
@RowanMerewood 4 года назад
@@FLUTTERMAD Domain and Path specify requirements for the request with the cookie, SameSite specifies a requirement for the *context* of the request. e.g. Domain can control if the cookies goes to sub1.example.com or sub2.example.com while SameSite specifies if the cookie should go to sub1.example.com when the request comes from another site, like google.com.
Далее
Cross-Site Request Forgery (CSRF) Explained
14:11
Просмотров 444 тыс.
Microservices Explained and their Pros & Cons
16:40
Просмотров 55 тыс.
WILL IT BURST?
00:31
Просмотров 17 млн
HTTP Cookies Crash Course
1:09:21
Просмотров 121 тыс.
Proxy vs Reverse Proxy Server Explained
14:18
Просмотров 131 тыс.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
Просмотров 944 тыс.
Difference between cookies, session and tokens
11:53
Просмотров 619 тыс.
The Same Origin Policy - Hacker History
12:19
Просмотров 107 тыс.
Cross Origin Resource Sharing (Explained by Example)
23:15
Cross Site Request Forgery - Computerphile
9:20
Просмотров 761 тыс.
microsoft doubles down on recording your screen
10:00