{"action":"created","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/109","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/109/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/109/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/109","id":53977317,"number":109,"title":"Invalid Authenticity Token with last version","user":{"login":"nicolas-besnard","id":1261670,"avatar_url":"https://avatars.githubusercontent.com/u/1261670?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-besnard","html_url":"https://github.com/nicolas-besnard","followers_url":"https://api.github.com/users/nicolas-besnard/followers","following_url":"https://api.github.com/users/nicolas-besnard/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-besnard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-besnard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-besnard/subscriptions","organizations_url":"https://api.github.com/users/nicolas-besnard/orgs","repos_url":"https://api.github.com/users/nicolas-besnard/repos","events_url":"https://api.github.com/users/nicolas-besnard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-besnard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-11T00:50:56Z","updated_at":"2015-03-12T04:33:58Z","closed_at":null,"body":"I get an error `ActionController::InvalidAuthenticityToken` with the last version (0.1.31.beta9). I had to had `protect_from_forgery with: :null_session` on [ApplicationController](https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/controllers/devise_token_auth/application_controller.rb#L4)."},"comment":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/comments/78422509","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/109#issuecomment-78422509","issue_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/109","id":78422509,"user":{"login":"lepek","id":166814,"avatar_url":"https://avatars.githubusercontent.com/u/166814?v=3","gravatar_id":"","url":"https://api.github.com/users/lepek","html_url":"https://github.com/lepek","followers_url":"https://api.github.com/users/lepek/followers","following_url":"https://api.github.com/users/lepek/following{/other_user}","gists_url":"https://api.github.com/users/lepek/gists{/gist_id}","starred_url":"https://api.github.com/users/lepek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepek/subscriptions","organizations_url":"https://api.github.com/users/lepek/orgs","repos_url":"https://api.github.com/users/lepek/repos","events_url":"https://api.github.com/users/lepek/events{/privacy}","received_events_url":"https://api.github.com/users/lepek/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T04:33:58Z","updated_at":"2015-03-12T04:33:58Z","body":"I think can say I can reproduce this issue:\r\n\r\nWithout protect_from_forgery with: :null_session:\r\n\r\n```\r\nStarted POST \"/api/v1/auth/sign_in\" for ::1 at 2015-03-12 01:30:38 -0300\r\nProcessing by Api::V1::SessionsController#create as */*\r\n  Parameters: {\"email\"=>\"mbianculli@gmail.com\", \"password\"=>\"[FILTERED]\"}\r\nCan't verify CSRF token authenticity\r\nCompleted 422 Unprocessable Entity in 3ms\r\n\r\nActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):\r\n  actionpack (4.2.0) lib/action_controller/metal/request_forgery_protection.rb:181:in `handle_unverified_request'\r\n  actionpack (4.2.0) lib/action_controller/metal/request_forgery_protection.rb:209:in `handle_unverified_request'\r\n  devise (3.4.1) lib/devise/controllers/helpers.rb:251:in `handle_unverified_request'\r\n  actionpack (4.2.0) lib/action_controller/metal/request_forgery_protection.rb:204:in `verify_authenticity_token'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:427:in `block in make_lambda'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:145:in `call'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:145:in `block in halting_and_conditional'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:92:in `call'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:92:in `_run_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n  actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\r\n  activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\n  actionpack (4.2.0) lib/abstract_controller/base.rb:137:in `process'\r\n  actionview (4.2.0) lib/action_view/rendering.rb:30:in `process'\r\n  actionpack (4.2.0) lib/action_controller/metal.rb:195:in `dispatch'\r\n  actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\r\n  actionpack (4.2.0) lib/action_controller/metal.rb:236:in `block in action'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in `serve'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/mapper.rb:49:in `serve'\r\n  actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'\r\n  actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'\r\n  actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'\r\n```\r\n\r\nWith protect_from_forgery with: :null_session it works. I created a custom controller that extends the default DeviseTokenAuth::SessionsController and I added this. But I think it shouldn't be needed.\r\n\r\n"}}