Extracted from the Ruby on Rails 7: NerdDice.com series (
youtube.com/playlist?list=PL9kkbu1kLUeMJFb0GT8ZMzr….
This playlist starts by providing an overview of authentication, the Ruby and Rails ecosystem, and choosing Devise despite the fact that there hasn't been a release yet that is compatible with Turbo (part of the new default Hotwire framework that ships with Rails 7).
We install and configure Devise, patch it to work with Turbo, add some basic compatibility with Tailwind and then use Rails browser-driven system tests to test the actual user experience with a browser and JavaScript. System tests are slower than other Rails tests, but when you have a mission-critical feature like user authentication that might be broken, it's worth the overhead.
During this series, we also receive and respond to a pull request from an outside collaborator. The app includes every Devise module except for :omniauthable
We conclude the playlist with a retrospective, on the lookout for continuous improvement.