How to do authentication with Devise via AJAX?

0

I need to , for example, on my site's home page using GEM Devise with AJAX. Does anyone know any way?

    
asked by anonymous 04.05.2014 / 02:13

1 answer

1

I would make a request for the page that generates the login form by ajax.

Then, just send a second request with the data entered by the user, without forgetting the tokens to avoid CSRF (and any other necessary data).

The request response should return the authentication cookies that should be used in the next requests.

    
10.11.2014 / 23:04