title: Rails devise-jwt session storage
body: <p>The devise-jwt gem documentation says that if session storage is enabled, you have to skip it for jwt auth. It says that you should set on devise.rb:</p>
  <pre><code>config.skip_session_storage = [:http_auth, :params_auth]
  </code></pre>
  <p>And you should disable :database_authenticatable. This part I quite don't understood. If in my User model, I remove :database_authenticatable, my route configured for login becomes unavailable:</p>
  <blockquote>
  <p>ActionController::RoutingError (No route matches [POST] &quot;/login&quot;):</p>
  </blockquote>
  <p>User.rb</p>
  <pre><code>class User &lt; ApplicationRecord
    rolify role_join_table_name: 'public.user_roles'
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
  
    # devise :database_authenticatable,
    devise :registerable,
           :recoverable,
           :rememberable,
           :validatable,
           :jwt_authenticatable,
           jwt_revocation_strategy: Devise::JWT::RevocationStrategies::Null
  end
  </code></pre>
  <p>devise.rb</p>
  <pre><code>config.skip_session_storage = %i[http_auth params_auth]
  </code></pre>
  <p>routes.rb</p>
  <pre><code>Rails.application.routes.draw do
    # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
  
    devise_for :users, defaults: { format: :json },
                       path: '',
                       path_names: {
                         sign_in: 'login',
                         sign_out: 'logout',
                         registration: 'signup'
                       },
                       controllers: {
                         sessions: 'users/sessions',
                         registrations: 'users/registrations'
                       }
  end
  </code></pre>
  <p>What should I do to keep session, but not for jwt auth?</p>