Setting Up Devise for Authentication
Creating an authentication system from scratch is rarely a good idea. It’s difficult to get every part of it correct since security controls can be subverted in unusual and counterintuitive ways. Because of this, we’re going to use a tried-and-true Rails plugin called Devise.[10]
Devise is built to handle almost any sort of authentication requirement, and will definitely suit our needs. Here’s what we want our authentication system to do:
- Employees who need to use our app will sign up on their own.
- They must use their company email when signing up.
- Their password must be at least 10 characters long.
We aren’t going to require users to validate their email addresses, mostly to keep things simple by ...
Get Rails, Angular, Postgres, and Bootstrap 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.