In Part 1 we generated a Rails 8 app and followed a request from route to controller. Today Study Flow gets its first real feature: users .
Before this Rails version, most people added a gem like Devise to get login. Rails 8 ships its own authentication generator . It writes plain Ruby code into your app, so you can read all of it, and that's exactly what we'll do.
What you'll learn
Running the Rails 8 authentication generator
What has_secure_password does for you
How a login works: the Session model, signed cookies and Current
How allow_unauthenticated_access and rate_limit protect your controllers
Adding a signup page, which the generator doesn't create, using params.expect
The idea in one minute
A website needs to remember who you are between requests, because HTTP forgets everything after each one.β¦