Session cookies in Remix

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 28

  • @kanz831021
    @kanz831021 5 หลายเดือนก่อน

    Thank you! I like the way you iterate over the solution to make it robust.

  • @coreyleelarson
    @coreyleelarson 11 หลายเดือนก่อน

    Thank you! Clear and concise. The cookie session storage is finally starting to click for me.

  • @Amvflix7
    @Amvflix7 3 หลายเดือนก่อน

    Thank you ❤️
    That was one really really high quality tutorial.
    Wishing you all the best in your endeavours. 🎉

  • @eleah2665
    @eleah2665 ปีที่แล้ว +2

    Very good. There is enough Next content out there. Not enough Remix.

  • @КонстантинАлександровский
    @КонстантинАлександровский 6 หลายเดือนก่อน

    That's great! That's what I need. Thank you very much! You explained everything simply and clearly!

  • @mhddngs
    @mhddngs ปีที่แล้ว +1

    It’s like you’re reading my mind! Cheers

  • @tech3425
    @tech3425 11 หลายเดือนก่อน

    This helped me understand remix sessions much better

  • @edgarasben
    @edgarasben ปีที่แล้ว

    Not using Remix currently, but learned a bunch, thank you!

  • @maxrchung
    @maxrchung 8 หลายเดือนก่อน

    great video thanks, cleared up some questions i had on remix sessions :)

  • @adiadiadi
    @adiadiadi ปีที่แล้ว +2

    I'm curious given your experience with both Next and Remix, do they differ in significant way, in feature-set and mental models? Or are they more similar than they are different at this point?

  • @btceatsfiat6641
    @btceatsfiat6641 หลายเดือนก่อน

    Epic stuff bro!

  • @TheBuilderCraft
    @TheBuilderCraft ปีที่แล้ว +4

    What if you change first part of cookie by not touching signature?

    • @shivam-dua
      @shivam-dua ปีที่แล้ว +8

      Signature is generated for provided data and secret. If data is tampered with, the signature generated during verification wouldn't match and session will be discarded.

  • @subodhpareek18
    @subodhpareek18 ปีที่แล้ว +3

    19:55 you mentioned cookie being encrypted, that is perhaps not an accurate description. It is signed but not encrypted, anybody with the cookie can still read the payload. For true encryption one would have to use something like Jose.

    • @samselikoff
      @samselikoff  ปีที่แล้ว +6

      Yes I realized this - verbal typo on my part! Thanks for pointing it out. Signed but not encrypted 👍 So the data is secure in the sense that it can be trusted to have come from the server. But you wouldn’t want to put sensitive data in it, since it can be read.

  • @laptopuser5198
    @laptopuser5198 ปีที่แล้ว

    More remix content please!

  • @codebulls7943
    @codebulls7943 11 หลายเดือนก่อน

    How do you manage to import createCookieSessionStorage module without having to name the file "session.server.ts"?. In order to get that module I need to add ".server" to the name's file. But I am getting null value when getting the cookie property in my loader

  • @neociber24
    @neociber24 ปีที่แล้ว +2

    Good video, but ngl makes me nervious seeing let instead of const lol

    • @samselikoff
      @samselikoff  ปีที่แล้ว +2

      Did you know parameters can never be marked as constants? For that and many other reasons, I really wish they had never become used as much as they are in JS vs. other languages. I’ve considered using const in videos just so it doesn’t come up and I understand it can be distracting because so many teams default to const, but pedagogically it’s hard for me to justify, because avoiding local mutation is simply not a concern a programmer should have to burden themselves with; and when it is called for, changing a const to a let detracts from the substance of what’s being taught.
      This is a good article on let vs. const and pretty much sums up how I feel: overreacted.io/on-let-vs-const/

  • @jsvrs
    @jsvrs ปีที่แล้ว

    hey Sam, what keyboard do you use? You type blazingly fast.

  • @ngaji_it
    @ngaji_it 11 หลายเดือนก่อน

    Thanks a lot. I have problem to understanding how remix set their cookie and how can I get cookie value using getSession method. In simple way, I can imagine cookie session storage like a DB that save a lot of key value pair.

    • @samselikoff
      @samselikoff  11 หลายเดือนก่อน +1

      The beauty of using Cookie storage rather than a DB is that the browser stores the session (and the server verifies it with the secret). The getSession method is reading the Cookie header from the request (timecode 7:54). Does that make sense?

    • @ngaji_it
      @ngaji_it 11 หลายเดือนก่อน

      @@samselikoff yeah, that does make sense. Nice explanation. Thanks

  • @ayushgogna9732
    @ayushgogna9732 ปีที่แล้ว

    can we do something like that in nextjs ?

  • @kumarvishalben
    @kumarvishalben ปีที่แล้ว

    noice noice

  • @brynobryno
    @brynobryno ปีที่แล้ว

    I love your content so much but one thing I keep wondering is "let" for everything. Why? :D Isn't it a better practice to use "const"?

    • @samselikoff
      @samselikoff  ปีที่แล้ว +1

      I disagree it's a best practice but honestly it doesn't really matter, I will probably start using const just because I don't want to distract anybody, but this article pretty much sums up how I feel: overreacted.io/on-let-vs-const/

  • @kirbymoody6985
    @kirbymoody6985 ปีที่แล้ว

    Promo sm