@StatelessCode
  @StatelessCode
Stateless Code | Codecast: Getting Started with Rails 7 19: Basic Auth Part 1 @StatelessCode | Uploaded January 2022 | Updated October 2024, 1 hour ago.
This is the 19th video in the Getting Started with Rails 7 series. In this video Mike starts the section on basic authentication and gets it working. Then he tries and does not (yet) succeed in getting the browser tests working with basic auth.

This video covers:
00:00:10 Introduction and review
00:05:07 Adapt ArticlesControllerTest for authenticated and unauthenticated user scenarios
00:13:20 Implement basic auth in ArticlesController
00:15:15 Validate behavior in UI
00:16:17 Fix failures in ArticlesControllerTest due to incorrect hash structure on update action
00:18:29 Adapt CommentsdControllerTest for authenticated and unauthenticated user scenarios and add auth to CommentsController
00:20:38 Try to get browser tests to work with Basic Authentication
00:45:36 To be continued...

Notes:
* As pointed out by Rails From Zero (youtube.com/channel/UCBIvferzfG3glF2iOz-oN9w) in the comments below, adding the debugger command to the in the test would have allowed us to pause the code and examine the current state (both in IRB and in the JavaScript console). This would have made debugging more efficient.
* Trying to get the browser tests to work with Basic Auth was not a smooth process. We leave the mistakes and troubleshooting in the videos on purpose because you can still learn from when things don't go well. See Why Leave Mistakes in the Videos youtu.be/-9bgFkLaWXY for more.

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Codecast: Getting Started with Rails 7 19: Basic Auth Part 1Codecast: statelesscode.com WordPress 12: Adjust Brand Logo, Main Content, and TaglineAdd an End Screen to a YouTube VideoInstall Ruby and Rails with Databases on Ubuntu 24.04Upgrade to Ruby 3.2.1 and Rails 7.0.4.3Nerd Christmas 2022 - Ruby 3.2 Released!Codecast: statelesscode.com WordPress 07: Add Brand Colors with TailwindInstall Node.js (versions 18, 20, 22) with NVM on Ubuntu 24.04Codecast: Create a RubyGem 59: Add Ability Score Functionality to Benchmark SuiteMediocre Karaoke - Spinning Wheel by Blood, Sweat & TearsCodecast: Getting Started with Rails 7 17: Refactor TestsCodecast: Getting Started with Rails 7 12: Add a Model and Route for Comments

Codecast: Getting Started with Rails 7 19: Basic Auth Part 1 @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER