InvalidAuthenticityToken in Devise :: SessionsController#destroy(已注销后退出) [英] InvalidAuthenticityToken in Devise::SessionsController#destroy (sign out after already having signed out)
本文介绍了InvalidAuthenticityToken in Devise :: SessionsController#destroy(已注销后退出)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用设计 3.2.0
进行身份验证,并发现在执行以下操作时出现问题:
I am using Devise 3.2.0
for authentication and found an issue when I do the following:
- 标签1: b
- 标签2:转到应用中的任何页面
- 标签2:标记 out (成功)
- 标签1:标记出(失败 - 看到例外)
- tab 1: sign in to app
- tab 2: go to any page in the app
- tab 2: sign out (success)
- tab 1: sign out (failure - see exception below)
异常提出:
ActionController :: InvalidAuthenticityToken在Devise :: SessionsController#destroy
ActionController::InvalidAuthenticityToken in Devise::SessionsController#destroy
在开发日志中我看到:
无法验证CSRF令牌的真实性
Can't verify CSRF token authenticity
堆栈跟踪的前三行是:
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
actionpack (4.0.0) lib/action_controller/metal/request_forgery_protection.rb:163:in `handle_unverified_request'
actionpack (4.0.0) lib/action_controller/metal/request_forgery_protection.rb:170:in `handle_unverified_request'
devise (3.2.0) lib/devise/controllers/helpers.rb:198:in `handle_unverified_request'
如何确保连续的签名
推荐答案
这个错误在 devise 3.3中修复了。 0
。
- 请参阅更改日志3.3.0
- 请参阅提取请求中的文件更改#2968
- note
already_signed_out
inconfig / locales / en.yml
- see the change log for 3.3.0
- see the file changes in pull request #2968
- note
already_signed_out
inconfig/locales/en.yml
这篇关于InvalidAuthenticityToken in Devise :: SessionsController#destroy(已注销后退出)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文