Rails Devise login using curl Rails Devise login using curl curl curl

Rails Devise login using curl


I would suggest you not to use curl and use mechanize instead because it handels this stuff automaticly when you call the login form first.

When you want to go on using curl you need to call the login page first and enable the cookiejar option to store the session for the next call. Then you could add the token so you can login. But this problem isnt specific to devise its a mecanism of Rails to not accept forms that were sent without the token.