Rails 3 Authentication: Authlogic vs Devise

I have always used Authlogic in Rails 2.3, but now that I am using Rails 3, I think I can try a new authentication solution.

How does Devify compare with Authlogic? What are their differences?

+42
ruby-on-rails-3 devise authlogic
Nov 09 '10 at 16:38
source share
6 answers

I used both of them, but not widely. In my last project, I gave the motto a shot. Instead, I used Rails-Warden.

Devise is a complete authentication system built on top of Warden. To customize the look, you use generators and then edit the views you have received. Its routes and viewing logic are hard-coded. For example, a successful login will always lead you to / session / new? It was a robber or I, I wanted my users to finish the "welcome / index". The developer is not as well documented or intuitive as authlogic.

Warden is a middleware environment. The developer is based on. It has plugins for many authentication schemes on the Internet (fb, openid, oauth), and it is easy to create a plugin for your own authentication. It has no interface, and documents are not as good as authlogic.

I ended up working with the rail chief because I needed to connect several user authentication schemes.

Also see below OmniAuth answer that I use in 2012.
+30
Nov 09 '10 at 17:34
source share

for development, if you want to send a successful login in "welcome / index", you add to routes.rb

namespace :user do root :to => "welcome#index" end 

as described https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in

personally, I like to design. he thinks itโ€™s great, and I think you can call it โ€œstubborn,โ€ but these opinions can be easily rewritten.

+31
Dec 12 '10 at 5:25
source share

I found that Devise is too stubborn for me. If you just want to accept the way he makes everything out of the box, it's good and easy. I had some specific requirements and found that I was writing things to get around Devise, so I finished ripping it off and upgraded Authlogic to Rails3 instead.

+11
Dec 09 '10 at 23:26
source share

Like the original questionnaire, I also always used AuthLogic in Rails 2.3 days, but decided to use Devise when AuthLogic was not ready for Rails 3.1 (when it was at the RC stage). In general, I did Devise to do what I want, but I am unhappy and wish that I did not make any changes.

User authentication seems simple at first glance and is ideal for linking, but so many times you want the user to fully interact with your site before requiring a login, and Devise makes it harder.

Yes, functions like put after_sign_in_path_for / after_sign_up_path_for in the Application Controller application, but these functions are not really intended to return a path, but if you use Devise, you will find that you insert large blocks of code into them. It works, but I have my own user controller for handling user-related actions, for me it is more elegant.

+9
Oct 13 2018-11-11T00:
source share

If you need OAuth multiple authentication for Twitter, Facebook, LinkedIn, and Google, you can use the OmniAuth gem with Authlogic. It is easy to understand and gives you full control over what happens when users authenticate from different social sites, which you do in authorizations_controller.rb.

+7
Jul 18 '11 at 23:29
source share

I like Devise. You can also use OmniAuth with Devise. I think the Devise project is very active and it has a lot of support on the Internet.

+3
Mar 29 '12 at 12:45
source share



All Articles