How to roll your own authentication in Rails - YouTube

22-Apr-2022 949
In this video, I show you how to make your own authentication in Ruby on Rails, from scratch. We make use of the has_secure_password module (don’t forget to enable the 'bcrypt' gem) and create a login form, logout and all of the helpers you will need for accessing the current account and prevent pages from being viewed by logged out accounts. It’s a bit of a longer video and not very polished, let me know in the comments if you appreciate the more raw feel or not. Chapters: 0:00 Introduction and recap from the last video2:28 Authentication helper methods4:40 current_account helper4:53 Authenticating routes6:07 Logout button8:00 Sign-in form11:47 Link login/register pages13:43 Handle invalid credentials15:50 Wrapping up...You'll find the docs for has_secure_password here:https://edgeapi.rubyonrails.org/class...
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle