erickreutz
erickreutz

Reputation: 2779

Good example of application that uses rails and backbone.js that handles authentication through backbone

Does anybody know of a good example I could look at as to how to go about implementing authentication through backbone with rails?

I haven't been able to find anything..

Upvotes: 3

Views: 2065

Answers (3)

Arnis Lapsa
Arnis Lapsa

Reputation: 47567

Found one example app. Trying to figure out what is what atm myself. But might be worth looking: https://github.com/diaspora/diaspora

Upvotes: -1

LDK
LDK

Reputation: 2575

You have several possibilities. First you can log in normally, with plain html. That login would guide you to your backbone.js application.

Another possibility is within your backbone.js app you have a login form that takes advantage of backbone.js's ":authentication_token". When your backbone.js app sends the login info it will get a token back. From then on you are able make ajax calls and receive responses with that token.

EDIT: see this post for an example of working with the token: http://www.hyperionreactor.net/blog/token-based-authentication-rails-3-and-rails-2

Upvotes: 2

Anatoly
Anatoly

Reputation: 15530

What you are looking about rails integration with client-side, except ajax queries and authentication/authorization?

Use the demo app to see how backbone.js is working: http://documentcloud.github.com/backbone/examples/todos/index.html

Upvotes: 0

Related Questions