class MyApp.SessionsController extends Batman.Controller
create: (params) ->
user = new MyApp.User()
user.url = '/sessions/create'
user.load {email: 'm...@example.com', password: 'foobar'}, (error, result) =>
throw error if errorAll I can think to do is the following in my SessionsController:class MyApp.SessionsController extends Batman.Controller
create: (params) ->
user = new MyApp.User()
user.url = '/sessions/create'
user.load {email: 'm...@example.com', password: 'foobar'}, (error, result) =>
throw error if errorBut this sends the password via a GET request, secure?The Rails console says [FILTERED] but Firebug shows the password.
On Wednesday, 1 May 2013 09:52:47 UTC+10, Maedi wrote:I know there's authentication code in the Classifieds app, however this is using OAuth:https://github.com/Shopify/batman-classifieds/blob/master/app/controllers/sessions_controller.rbI'd really appreciate help with the more common scenario of a login screen (SessionsController) which then sends login info to Rails. So far I'm having a hard time connecting the 2.For example, how do we call a custom REST action from the server without calling something like ".load" on a Batman model? This would help me (I think) in getting my client-side authentication to work.
--
You received this message because you are subscribed to the Google Groups "batman.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to batmanjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
In general, with these one page apps, I allow the sign_in/sign_up routes to be passed through to the regular rails controller. So I have a "one page app" once a user is signed in but there will be a full browser refresh when they sign_in/sign_up/sign_out. I haven't ran into any problems with it so far. That's my two cents. :)
--
You received this message because you are subscribed to the Google Groups "batman.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to batmanjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
@on 'run',->--
You received this message because you are subscribed to the Google Groups "batman.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to batmanjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.