Rails 7.1 Authentication From Scratch

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 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 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?

  • @jaspermendiola7420
    @jaspermendiola7420 Год назад +1

    will definitely check this

  • @gavranhas
    @gavranhas 7 месяцев назад +1

    That was great! Thank you for such useful explanation.

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

  • @josbexerra8115
    @josbexerra8115 9 месяцев назад +1

    Excelente mister chris. muchas gracias

  • @ashishgaur1398
    @ashishgaur1398 8 месяцев назад

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

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

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

  • @danlinar4410
    @danlinar4410 Год назад +1

    Thank you, it is a great update

    • @excid3
      @excid3 Год назад

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

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

  • @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 9 месяцев назад

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

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

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

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

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

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