Rails 3 authentication solutions

后端 未结 8 1810
再見小時候
再見小時候 2020-12-24 10:09

I poked around StackOverflow and Google, but couldn\'t find anyone who has put together a comparison of authentication gems or plugins for Rails (I\'m looking for something

相关标签:
8条回答
  • 2020-12-24 10:55

    Kinda late to the party, but I wrote something up for it here:

    http://zergsoft.blogspot.jp/2012/08/rails-3-authentication-compared-warden.html
    

    I cover Warden, Devise and home grown.

    0 讨论(0)
  • 2020-12-24 11:01

    Ruby toolbox has a list of the most popular ones: http://ruby-toolbox.com/categories/rails_authentication.html

    You can see that Devise and Authlogic are definitely the most popular.

    Personally I use Devise. It works well with Rails 3, is easily customizable, and makes it very easy to integrate Twitter and Facebook based auth.

    0 讨论(0)
  • 2020-12-24 11:04

    The tutorial by Michael Hartl is great for learning how to set up your own.

    http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

    I have used that on multiple apps and love the flexibility of setting up my own Authentication Method.

    Though for the most part I use Devise and LOVE it. It is very quick/easy to implement, very secure, and does exactly what I need it do.

    https://github.com/plataformatec/devise

    I will typically use it in conjunction with CanCan and Rolify

    0 讨论(0)
  • 2020-12-24 11:08

    In Rails authentication from scratch is dead simple to do. Ryan Bates covers this here http://railscasts.com/episodes/270-authentication-in-rails-3-1

    0 讨论(0)
  • 2020-12-24 11:09

    I am surprised OminAuth did not get a mention in any of the answers. (Agreed OmniAuth is more recent than this question is, but there are answers that came after)

    Undoubtedly, this is the most exhaustive authentication solution available currently for rails applications.

    Under the hood, OmniAuth uses OAuth2, which is evolving as the de-facto standard for authentication in web applications across platforms and frameworks. Almost all major internet players support OAuth2 - Github, Google, Facebook, Twitter, LinkedIn are just a few to name.

    Of course, Devise works very well with OmniAuth so It should not be a major headache for those already using Devise

    0 讨论(0)
  • 2020-12-24 11:09

    I'm a big proponent of rolling your own. Depending on your requirements its fairly straight-forward and reduced dependency on a key component. Rails 3.1 makes it even easier.

    0 讨论(0)
提交回复
热议问题