Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails authentication guide

Does anyone know of a good guide on building your own authentication system in ruby on rails? I want to roll my own system to use with my community im building :)

Thanks!

like image 513
Lisinge Avatar asked Mar 31 '10 13:03

Lisinge


1 Answers

I'd recommend starting with Warden - it'll handle the very basics of sessions for you, and give you a good foundation to build your logic on top of. The Rails Warden plugin is a rather small library that helps integrate it into Rails. Both of these projects are fairly mature and well-constructed yet still under active development - they're good choices all around.

You should be aware of Devise, another authentication framework (like Authlogic or Restful Authentication) that is based on Warden. It may not be a good fit for your project (it wasn't for mine), but looking through the source might give you a few ideas on how best to use Warden.

The other thing I'll note is that, in terms of hashing passwords, you should absolutely use bcrypt.

like image 113
PreciousBodilyFluids Avatar answered Oct 04 '22 18:10

PreciousBodilyFluids