Authentication and Devise
Premium Content - Free Preview
One of the most basic feature of dynamic websites is user accounts. This lets people do things on the site and save information, something simple static sites cannot offer.
To enable user accounts, an application needs to let users register with a logon id (such as an email) and a password. Later, a user can use this information to sign in, and the application will check that the logon id and password match to authenticate the user.
Registration and authentication is complex, but the overall process is usually very similar on different websites, so it's a good process to 'outsource' to a gem. To find an authentication gem, let's Google it. The top result is from Ruby-Toolbox, and it lists multiple gems we could use.
The bar chart on the top shows the popularity of each gem, and below that is a list of the gems with more info and links. The first gem, devise, has over 1.1 million downloads and is quite popular on Github. You can tell that it's used by many people and is actively maintained, so it can't be a bad choice. Devise is actually a great choice if you want to get authentication set up quickly, want the option to add more features later, and are willing to go along with its default ways.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.