© Greg Donald 2024
G. DonaldHands-on Test-Driven Developmenthttps://doi.org/10.1007/978-1-4842-9748-3_12

12. User Authentication

Greg Donald1  
(1)
Clarksville, TN, USA
 

Eventually, our blog application will have an administration interface, and we will need to make sure that only an administrator user can access it. To this end, we will need to add the ability to authenticate to our user model. This chapter will cover how to do that.

Some readers may begin wondering why we are not using a third-party authentication library such as Devise. The reasons are

  • We want to always keep our application as simple as possible, with as few dependencies as possible. As you will soon see, adding a user model with salted password authentication is not difficult. ...

Get Hands-on Test-Driven Development: Using Ruby, Ruby on Rails, and RSpec now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.