我正在阅读Devise gem的初始化文件(config/initializers/deviser.rb),并且很难理解这一部分.
# By default Devise will store the user in session. You can skip storage for # :http_auth and :token_auth by adding those symbols to the array below. # Notice that if you are skipping storage for all authentication paths, you # may want to disable generating routes to Devise's sessions controller by # passing :skip => :sessions to `devise_for` in your config/routes.rb config.skip_session_storage = [:http_auth]
我之所以看这个是因为我正在尝试使用基于api的令牌认证,在这种情况下我需要将该配置行更改为:
config.skip_session_storage = [:http_auth, :token_auth]
任何人都可以解释评论的内容吗?