我现在正在使用以下 gem 并设计,因为设计删除了对令牌身份验证的支持。 https://github.com/gonzalo-bulnes/simple_token_authentication
我在这里缺少的是,我已经完成了所有配置设置,但是当我http://localhost:3000/user/sign_in.json
在 Google 上使用 RestConsole Tester 时。
我收到以下错误:
ActionController::InvalidAuthenticityToken 在 /users/sign_in.json
ActionController::InvalidAuthenticityToken 动作包 (4.0.2)
lib/action_controller/metal/request_forgery_protection.rb,第 163 行
def initialize(controller) @controller = controller end def handle_unverified_request raise ActionController::InvalidAuthenticityToken end end end protected
有任何想法吗?