Rails 7.1 Authentication From Scratch

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

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

  • @wotok7
    @wotok7 ปีที่แล้ว +13

    Chris congratulations, gorgeous video! As a Ruby on Rails programmer with 10 years of experience, I believe that this video will be used as a demonstration of the power of Ruby on Rails!

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

      I hope so! It's time that Rails becomes cool again!

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

    Chris you surely are a master of the game!

  • @mengyan3214
    @mengyan3214 6 หลายเดือนก่อน +2

    Wow, it blows my mind. Need some time to digest. Thank you Chris.

  • @gavranhas
    @gavranhas 7 หลายเดือนก่อน +1

    That was great! Thank you for such useful explanation.

  • @RiddlerSA
    @RiddlerSA 7 หลายเดือนก่อน +1

    Super useful video! 🔥 I just didn't include devise gem to my new project for the first time.

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

    Thanks for the very concise and clear example of setting up a login system! It has been way too many years since I had to do it and needed the refresher. Do you also have videos explaining how to effectively test the log in flow and controllers requiring an authenticated user?

  • @josbexerra8115
    @josbexerra8115 10 หลายเดือนก่อน +1

    Excelente mister chris. muchas gracias

  • @okyerespencer3784
    @okyerespencer3784 ปีที่แล้ว +5

    Great video Chris. Please make another one but in this case the rails would serve as the backend and a react application would communicate with the backend. With all authentication implementation.

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

    Thanks a lot! It's easier than I thought it would be...❤

  • @Oliver-ic8pi
    @Oliver-ic8pi ปีที่แล้ว

    Awesome tutorial!! Some really nice new features too - what a great time to be a Rails developer. Thanks Chris :)
    Quick question if you get chance... do you see any advantages for using this over Devise? Obviously Devise is more established and is quicker to implement, but is this any more secure or is there a particular use case for building ourselves?
    Thanks again!

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

      Definitely still recommend using Devise. It will get security updates and is battle tested.
      Your own custom auth will not be unless you hire a security team to audit your code.

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

    Thank you for the video, I was wondering why don't you use Devise for this?

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

      We still recommend Devise so the community can provide you security updates. However you might need to build authentication from scratch if you need custom authentication.

    • @20hair
      @20hair ปีที่แล้ว

      @@GorailsTV Understand, Thank you :)

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

      It's because he's trying to teach us how authentication works under the hood. It may also be beneficial to be able to build authentication systems yourself as well. Just out of interest, is there a way of deleting a specific Rails version?

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

    will definitely check this

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

    Great video. Thank you Chris! What do you recommend for stateless authentication using Rails 7.1.x ? I'm looking for a JWT gem that works with the latest Rails

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

      We did a pro episode on JWTs here gorails.com/episodes/jwt-authentication-from-scratch-with-rails

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

      @@GorailsTV Ok, I'll check it out. Thanks!

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

    How this will be in Rails 8? I have heard is there an in-house implementation ready to be used

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

      We will be covering that very soon

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

    Great tutorial. Do you have the code for it somewhere? Will be useful to go through it since the video was filled with new-to-me rails concepts

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

    Thanks for a great video. I missed one thing. How are those tokens one-time? You use it at least twice (to find user for edit and update actions). At which moment rails revokes them? Or is it only relies on ttl?

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

      The content returned by the block is embedded in it. When the value changes the token is no longer valid.

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

    Great video, but I have a question: where the reset_session method comes from?

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

      From Rails

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

    Hey Chris, thanks for the video. Would request you to please create videos on rspec and selenium. Thanks

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

    Could you explain how to do the Auth using the phone number instead of Email ?

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

      At a high level, you'd swap email for phone number (or in addition) and you'd probably need to send an SMS with a random code the user confirms to ensure they are the owner just like you would do with 2FA.

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

    hello frens I'm learning Rails and I heard about the gem called Devise, and the question is whether this autentication from scratch can replace Devise or I still should learn and use Devise? thanks

    • @GorailsTV
      @GorailsTV  6 หลายเดือนก่อน +1

      We recommend building it yourself to learn and then using devise for the automatic security updates

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

      @@GorailsTV thanks frend

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

    Thank you, it is a great update

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

      Agreed! Some wonderful quality of life improvements in Rails 7.1!

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

    that "generate token for" can be used for a rails api auth? like a jwt

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

      You'd want to use something else so it can be revoked.

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

    Very resourceful video! Can you do the same to authenticate multiple users with different roles using one login to access the system? Let me know if it's possible.

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

      I would add roles to the User model (or AccountUser if a user can be part of multiple accounts).

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

    WOW