What is your favourite authentication gem and why?

49 views
Skip to first unread message

desbest

unread,
Oct 21, 2013, 12:34:01 PM10/21/13
to rubyonra...@googlegroups.com
What is your favourite authentication gem and why?
Right now I have 4 to choose from (Cancan, Clearance, Rails Cast) and I don't know which one to pick.
I cannot use Device because I'm a beginner at Rails.

Walter Lee Davis

unread,
Oct 21, 2013, 12:40:40 PM10/21/13
to rubyonra...@googlegroups.com
CanCan is an Authorization solution, not an Authentication solution. Devise is Authentication only, and relies on CanCan or another Authorization framework to do that part of the job. Apples and Oranges, I'm afraid.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d9253b08-eab7-4b9f-963c-9fae647f0f70%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

tynamite

unread,
Oct 21, 2013, 12:43:28 PM10/21/13
to rubyonra...@googlegroups.com
What's the difference between an Authentication and Authorisation solution?
From what I understand, I can use a column in the users table called level, and have number 5 be an admin like if user.level == 5


You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/-P_ilf90xvo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.

Walter Lee Davis

unread,
Oct 21, 2013, 12:46:27 PM10/21/13
to rubyonra...@googlegroups.com
Authentication is "are you who you say you are". It establishes a session with the browser, and uses a login to check credentials before allowing that session to see anything you've protected from public view. Authorization uses a method like you describe, which allows certain _authenticated_ people to do certain things. You can't have authorization without authentication -- they build on one another. But they solve different problems than one another.

Walter
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/37308DAC-EF52-4903-8F36-07409FEF55F4%40wdstudio.com.

Lei Zhao

unread,
Oct 21, 2013, 12:57:58 PM10/21/13
to rubyonra...@googlegroups.com
If you are trying to learn Rails and creating your first app with authentication, I think it's a good idea to build it from scratch so you have a better understanding about what is going on under the hood.

After you have mastered it and/or just want to build your app quickly with standard authentication features, use Devise to save some time.
Lei


--

tynamite

unread,
Oct 21, 2013, 1:11:26 PM10/21/13
to rubyonra...@googlegroups.com
I've decided to use the authentication system from the Ramaze ruby framework, as it's the most simplest. I'll let you know how it goes.



--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/-P_ilf90xvo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.

Colin Law

unread,
Oct 21, 2013, 1:11:26 PM10/21/13
to rubyonra...@googlegroups.com
If you are so much a beginner that Devise is too complex to understand
then first you need to work right through a good tutorial such as
railstutorial.org, which is free to use online.

Colin

tynamite

unread,
Oct 21, 2013, 1:13:14 PM10/21/13
to rubyonra...@googlegroups.com
I'm currently using Rails Tutorial, but there's a mistake in the book (which I emailed Michael to be corrected) so now I'm stuck and cannot go any further.


--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/-P_ilf90xvo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Colin Law

unread,
Oct 21, 2013, 1:15:43 PM10/21/13
to rubyonra...@googlegroups.com
On 21 October 2013 18:13, tynamite <afanint...@gmail.com> wrote:
> I'm currently using Rails Tutorial, but there's a mistake in the book (which
> I emailed Michael to be corrected) so now I'm stuck and cannot go any
> further.

Explain the problem here, probably someone will be able to help.
Start a new thread though so it does not appear under this subject
line.

Colin

>
>
> On 21 October 2013 18:11, Colin Law <cla...@googlemail.com> wrote:
>>
>> On 21 October 2013 17:34, desbest <afanint...@gmail.com> wrote:
>> > What is your favourite authentication gem and why?
>> > Right now I have 4 to choose from (Cancan, Clearance, Rails Cast) and I
>> > don't know which one to pick.
>> > I cannot use Device because I'm a beginner at Rails.
>>
>> If you are so much a beginner that Devise is too complex to understand
>> then first you need to work right through a good tutorial such as
>> railstutorial.org, which is free to use online.
>>
>> Colin
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ruby on Rails: Talk" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/rubyonrails-talk/-P_ilf90xvo/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> rubyonrails-ta...@googlegroups.com.
>>
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv%2Bcn80cNDUrOsjL-hTT9-qxu6qFU%2BpkynrPj7rgkfqrw%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAEZ7cNMhpzvEX9p9Rt1jnsVxs0Quor0WkMpn_x-yvA0E5-5KFA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages