2

I wanted to perform a POST request to my rails backend from my iPhone app. However, I don't have access to the authenticity token, which prevents me from performing this operation. I was looking through some resources on the internet and I found these slides.

On page 19, the author says that this problem is solved either by disabling the authenticity token or by using db based sessions.

Following the instructions on this question I have already set my rails application to use the db based sessions. But I don't understand how I can bypass the authenticity token with this technique. Can anyone explain that to me?

Thanks

Community
  • 1
  • 1
Renan
  • 1,910
  • 4
  • 22
  • 36
  • are you using devise to authenticate ? it is different for different authentication frameworks. – Jakub Oboza May 07 '12 at 14:42
  • No actually I was using a custom-made module for that. But I can change to a framework if that helps. Can you post an answer using Devise? – Renan May 07 '12 at 15:05

1 Answers1

0

But I don't understand how I can bypass the authenticity token with this technique. Can anyone explain that to me?

This should answer your question How do I ignore the authenticity token for specific actions in Rails?

Community
  • 1
  • 1
Hoa
  • 3,179
  • 1
  • 25
  • 33