Rails 7.1 Authentication From Scratch

Поділитися
Вставка

КОМЕНТАРІ • 41

  • @wotok7
    @wotok7 11 місяців тому +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  11 місяців тому +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.

  • @RiddlerSA
    @RiddlerSA 6 місяців тому +1

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

  • @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.

  • @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?

  • @gavranhas
    @gavranhas 7 місяців тому +1

    That was great! Thank you for such useful explanation.

  • @josbexerra8115
    @josbexerra8115 9 місяців тому +1

    Excelente mister chris. muchas gracias

  • @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?

  • @ashishgaur1398
    @ashishgaur1398 7 місяців тому

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

  • @jaspermendiola7420
    @jaspermendiola7420 Рік тому +1

    will definitely check this

  • @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.

  • @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

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

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

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

      We will be covering that very soon

  • @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!

  • @giordanodiaz5047
    @giordanodiaz5047 8 місяців тому

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

  • @danlinar4410
    @danlinar4410 Рік тому +1

    Thank you, it is a great update

    • @excid3
      @excid3 Рік тому

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

  • @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.

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

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

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

      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 5 місяців тому

    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  5 місяців тому +1

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

    • @deepfuchsia7204
      @deepfuchsia7204 5 місяців тому

      @@GorailsTV thanks frend

  • @LawrenceChege
    @LawrenceChege 11 місяців тому

    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  11 місяців тому

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

  • @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.

  • @mikopiko
    @mikopiko Рік тому +1

    WOW