Monday, December 17, 2012

Different Approaches for Authentication in Ruby on Rails

0 comments
Ruby on Rails also versed as “Rails” has gone open source in 2004. It is a full-fledged web application platform for the Ruby programming language. In 2005, it had opened gateways for ruby on rails programmers to modify the codes and work on this platform to make it much better. Since then, this framework came with different solutions to solve the most common problems of authentication  in web applications. 


Here in this blog, let us find out how authentication solutions emerged out, what you have to work with, and how to select the right one based on how it will be used more profoundly. This open source framework is among the most sought- after tech skills, therefore Ruby on Rails developers are looking for the effective ways to catch up the speed.

In the early stage, login engine and est_full authentication were the preferred tools in Rails framework to solve authentication issues. With the Web becoming more open, complex and social, Ruby on Rails community grew, bringing out new and improved plugins, and codes to offer better quality authentication solutions.

On the contrary, the newbies – Authlogic and Clearance, played the opposite roles. Authlogic includes lot of features whereas Clearance is as simple as possible.

Let us explore some of the most common cases for authentication in a web application development


  1. Web app that includes just one “User name”
  2. Different applications that needs third-party authentication. For example, Twitter, Facebook, Google, etc.
  3. When applications need more than one role, like “Admin” and “User.”
  4. Several Web applications that share users and credentials.
  5. Web applications that use embedded Rails and Sinatra applications.
  6. On application with one engine that uses its their own authentication system. And, remember, we don´t want to get the routes and controllers overlapped.
  7. Numerous Web applications that have to share users and credentials, and play several different roles.

 

The Different Mediums To Suit Authentication Case


Devise: A flexible authentication approach for Rails with Warden.

Clearance: Rails authentication and authorization with username, email and password.

Authlogic: A clear, easy and simple Ruby authentication solution.

Letmein: Provides easy authentication.

OmniAuth: A Rack framework for multiple-provider authentication.

Sorcery: This framework offers common authentication tools, such as signing in/out, activating by email and resetting passwords.

Warden: A Rack-based middleware designed to provide a setup for authentication in Ruby Web applications. It’s a common mechanism that fits into the Rack Machinery to offer powerful authentication options.

Thus, when you have to choose an authentication solution for your Rails based web app development, it is better to choose the one based on the features that is important.

Leave a Reply