Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby User Authentication with Rails Password Hashing and Sign In How Password Hashing Works

What about using the devise gem? Is it safer to create our own user authentication than using a gem like devise?

You can check the devise gem here (https://github.com/plataformatec/devise).

If it is ok to use it, can you recommend me other gems like devise?

1 Answer

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Devise is the most commonly used authentication system and you will probably eventually use it in most projects. Gems like Devise were created to save time when doing things that are very common and seen in almost any project (imagine writing your own authentication EVERY single time). It's good to know how it works under the hood, so this course should be done at least once before tackling Devise. The gem is similar to what is done in these videos, and also has some additional features and helpers that you may not need. It's definitely safe (safety level is probably the same, since Devise also uses bcrypt), but customization and configuration is somewhat harder, since lots of stuff is hidden behind the gem and you don't access it the same way you would access your own authentication system.