0

I'm trying to create a webapp using Backbone.js 0.9.2 + Rails 3.2.0. I'm having trouble figuring how to link authentication & authorization (role management) with the app. I'd like to use as much off-the-shelf product as possible.

After some research, I think Devise is pretty nice for user management, but I don't see any tutorials on Devise + Backbone.js. Does anyone have suggestions?

Also, I keep hearing about CanCan. Do I need it if I'm going to use Devise? Are there other options?

Cheers, Dean

netwire
  • 7,108
  • 12
  • 52
  • 86
  • I found this: http://joshhuckabee.com/integrating-devise-backbonejs, but it uses Handlebars template and doesn't cover authorization. – netwire May 23 '12 at 22:36
  • If you're new to Rails, I wouldn't recommend attempting to incorporate Backbone. – anxiety Aug 26 '12 at 20:57

1 Answers1

2

Devise handles authentication and CanCan handles authorization. I'm not sure how backbone.js plays into things since I've never used it before.

Just in case you're wondering, authentication has to do with logging in and logging out. And authorization is seeing if a logged in user or guest has access to utilize particular resources of your application. That's the nutshell from what I've read about it. Of course, I could be mistaken as I'm no expert with these things.

There are other options, but Devise and CanCan has been well established in the Rails community: https://www.ruby-toolbox.com/categories/rails_authorization

https://www.ruby-toolbox.com/categories/rails_authentication

Good luck!

Zhao Li
  • 4,936
  • 8
  • 33
  • 51