Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between OmniAuth Identity strategy and Devise?

I have been exploring authentication options for my Rails App. I need to have username/password authentication along with the option to link the user with his Facebook, Twitter, Foursquare etc. identities. I generally find people using Devise and OmniAuth for this purpose. But, OmniAuth 1.0 comes along with OmniAuth Identity strategy for username/password. So what is the advantage of using Devise? Won't it lead to unnecessary complexity compared to an Omniauth only authentication?

like image 647
rohitmishra Avatar asked Oct 08 '22 06:10

rohitmishra


1 Answers

With the OmniAuth-Identity you can create a user and authenticate it with OmniAuth. OmniAuth-Identity is yet another provider for authentication and you can't link it with other providers, like twitter, facebook, etc. This is mentioned in the very end of http://railscasts.com/episodes/304-omniauth-identity.

If you want this linkage you should use Devise+OmniAuth (see http://railscasts.com/episodes/235-omniauth-part-1).

like image 184
yashaka Avatar answered Oct 12 '22 11:10

yashaka