Authentication and authorization

I’d like some help to do both.

Either an easy way to do it from scratch or a gem.

I saw the way it’s done at Ruby on Rails Tutorial, but couldn’t understand it very well, so thats why I want an easier way (or gem).

I’ve been told that the gem Devise does the Authentication, but not the authorization. Is it true? Or can I do authorization with Devise?

Thank you,

Rodrigo

You might want to look into the trinity of devise, cancan and omniauth. That handles everything. Cancan is used for authorization.

you could try authlogic too. it's very easy to configure and use.

I’d like some help to do both.
Either an easy way to do it from scratch or a gem.

I saw the way it’s done at Ruby on Rails Tutorial, but couldn’t understand it very well, so thats why I want an easier way (or gem).

I’ve been told that the gem Devise does the Authentication, but not the authorization. Is it true? Or can I do authorization with Devise?

Thank you,

Rodrigo

Rodrigo, the goal of the Ruby on Rails Tutorial was to teach you the fundamentals of Rails and how to build web applications using the

framework. Thus, within one or maybe two of his lessons, he showed you how to build authentication for a Rails application using TDD

from scratch. He just wanted you to be familiar with what goes into authentication so that you could better understand gems like Devise

and Authlogic. Next, I would highly recommend taking another look at this material within the book and make sure you understand it

before jumping into one of the authentication gems. Furthermore, reading the source and documentation of these gems are always a good

thing to understand what it’s doing/(not doing) and how it’s being done. In short, the goal of the tutorial is learning Rails using TDD to

enforce an understanding of the concepts within the framework. Also, please do not rush the learning process because it’s like building

code without tests. :slight_smile:

Good luck,

-Conrad

Maybe have a look at Cream [1]. It handles authentication,
authorization, user roles, and permissions in a single project (making
use of devise and cancan). It seems to be actively used and developed.

I've not yet tried it, but I'm about to make my first steps.

[1] https://github.com/kristianmandrup/cream

Kenny

Thank you very much, I’ll look into it

Actually it is deprecated by the author, and there's another project
called "troles"[1] which looks much better.

[1] https://github.com/kristianmandrup/troles

Kenny

devise+cancan