0

I was using authlogic on my Rails app and decided to remove it in favor of implementing 3rd party authentication using OAuth. Switching to to this approach has left me with a very interesting problem:

The rails session object is empty when I make a post request from the app. A 'get' request always has the session populated but not a post. I can verify that it is indeed posting the session cookie in both cases but dont see why this is happening.

Any ideas why this is happening or tips to debug this?

udit
  • 2,745
  • 3
  • 33
  • 44

1 Answers1

0

This is because the posts were missing the csrf token. For some reason, Authlogic takes care of the CSRF verification for AJAX posts.

udit
  • 2,745
  • 3
  • 33
  • 44