2

I have developed a Rails 4 application and I am planning to use a simple and efficient user management solution in my application. I have checked the Devise gem and found that it has a lot of features which i don't want to implement/mess with in my code.

My User management is very simple: I have a list of users. Each user has some role intern bring to some privileges. I want to store the currently logged in user some where in application which can be accessed anywhere from within the application. I also want to check in the controller whether the current logged in user has access to this controller.

I am not authenticating the user against my local Database, instead I am doing that using Facebook.

Any help is appreciated.

1

1 Answer 1

5

Check out sorcery, it's more lightweight and less obscure than Devise. This is its philosophy (extracted from readme):

Sorcery is a stripped-down, bare-bones authentication library, with which you can write your own authentication flow. It was built with a few goals in mind:

  • Less is more - less than 20 public methods to remember for the entire feature-set make the lib easy to 'get'.
  • No built-in or generated code - use the library's methods inside your own MVC structures, and don't fight to fix someone else's.
  • Magic yes, Voodoo no - the lib should be easy to hack for most developers.
  • Configuration over Confusion - Centralized (1 file), Simple & short configuration as possible, not drowning in syntactic sugar.
  • Keep MVC cleanly separated - DB is for models, sessions are for controllers. Models stay unaware of sessions.

Here you can read about using sorcery together with Facebook authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.