Securing your app with the default Authentication Generator | Rails 8 Unpacked

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 30

  • @meagar
    @meagar 26 днів тому +3

    Hi, it was great meeting you at Rails world.
    A note on storing sessions in the database, along with IP and user agent - this allows you to provide session management features. The kind of thing where you log into your Google account and are allowed to review your logged in devices, and terminate sessions you don't recognize. This is a super important (and often overlooked) feature of a good Authentication system.
    In the typical Rails setup, where the session only exists as a signed cookie stored in the browser, you cannot centrally review sessions, _or_ expire them. There's no way for you to tell if a strange session exists on an IP you don't recognize.

  • @railsmagicmike
    @railsmagicmike Місяць тому +4

    Great video! It looks so modern and dynamic! Very good editing, and I love that you guys used Two different cameras for the tutorial. That added a very personal touch it was a good call. 👌

  • @snailprogrammer7483
    @snailprogrammer7483 День тому

    You and NetworkChuck twins? You guys act so similar!
    Awesome video! I’ve been attempting to build a website project as a beginner for many months using either Rails or Django. (I have started, deleted and restarted the project so many times) I think I’m gonna use Rails. Even though I’m in school for Python and Software Engineering

  • @edu28811
    @edu28811 7 днів тому

    Great video! Thank you Typecraft

  • @IvanMorgillo
    @IvanMorgillo 29 днів тому +9

    I want to know everything about your terminal and Neovim setup 😍 Which plugins are you using? Where can I find the cheat sheet for all the shortcuts you are using? 🙏🙏

  • @kalist8938
    @kalist8938 Місяць тому +3

    Really cool video. Love Rails ❤️

  • @SteveHazel
    @SteveHazel Місяць тому +1

    pretttttty niiiiiiice ! ...and ...i meeeeean ...this guy is mighty entertainin'

  • @uuidv5
    @uuidv5 Місяць тому +2

    Great video for basics on auth, for newbies note that he *does not cover sign up* , as it is not part of the authentication generator

  • @PosturaCorretta
    @PosturaCorretta Місяць тому

    Fantastico!

  • @carlitokite
    @carlitokite Місяць тому +4

    Thanks Devise for so many years of great work, but it's time to move to a simplified and understandable alternative to complexe!
    Any simple migration guide/script from Devise to Rails 8 Auth ?

    • @IvanTurkovic
      @IvanTurkovic 29 днів тому

      After using devise for the last decade I feel comfortable using it, is there any reason why you want to move away from existing devise to built in authentication?

    • @carlitokite
      @carlitokite 29 днів тому +1

      ​@@IvanTurkovic
      Devise is a huge engine where most of the time, we use only a tenth of it's potential.
      I think that removing a gem + having all code in the project is 100 times better

    • @rafawrzochol4590
      @rafawrzochol4590 28 днів тому

      radanskoric.com/guest-articles/from-devise-to-rails-auth

  • @SupeRails
    @SupeRails Місяць тому

    what css template are you using for the recordings?

  • @WickedAyman
    @WickedAyman Місяць тому +1

    Gotta say, tou're good man. Shut up and take my money (any course you make on rails)

  • @danvictorlofranco6700
    @danvictorlofranco6700 Місяць тому +3

    does rails 8 authentication have jwt support? Afaik it only has sessions based

    • @EmeraldHeart7
      @EmeraldHeart7 Місяць тому

      You can improve it with the current generator, i've make it on my own

    • @danvictorlofranco6700
      @danvictorlofranco6700 Місяць тому

      @@EmeraldHeart7 I am planning to do it, but It still nice to have a jwt option in the generator. I found some guy did a pull request in rails github about it and I hope that it get approved

    • @danvictorlofranco6700
      @danvictorlofranco6700 Місяць тому

      @@EmeraldHeart7 I am planning on modifying stuff to make it work, but still it is really nice to have a dedicated --api option or something for this auth. I found some guys doing pull request for this suggestion, and hoping it gets approve.

  • @Bockwurstwecken
    @Bockwurstwecken Місяць тому

    Isn't the session stored in the database so that it persists when the server is restarted?

  • @cloudagnostic
    @cloudagnostic Місяць тому

    Is devise still a thing?

  • @MiguelPeniche
    @MiguelPeniche Місяць тому

    I really want that mug but I currently can’t buy it in Mexico. If you want I can serve as storage for selling RoR merch here. 💡

  • @mooktakim
    @mooktakim Місяць тому

    I need to grow a mustache

  • @robertxworld
    @robertxworld 10 годин тому

    SWEET SWEET SAAS MONEY

  • @richardhulse9328
    @richardhulse9328 Місяць тому

    Can you please breath, really hard to listen to and watch.

  • @1108penguin
    @1108penguin Місяць тому

    Not sure why but Current.user didn't work in my app. I had to implement current_user like this:
    helper_method :current_user
    def current_user
    if session = Session.find_by(id: cookies.signed[:session_id])
    @current_user ||= session.user
    end
    end
    Why couldn't I use Current.user even after authenticating?

    • @akshaysharma6604
      @akshaysharma6604 Місяць тому

      make sure you have added user as an attribute in Current model like this: "attribute :user, :some_var"

    • @eoghain5021
      @eoghain5021 23 дні тому

      I’m pretty sure current_user is a devise variable? So it makes sense you’d have to declare it manually. Unless the built in auth also uses current_user