title: Can't get JWT token when using devise and JWT for reset password feature
body: <p>I am using a gem named: <a href="https://github.com/waiting-for-dev/devise-jwt" rel="nofollow noreferrer">devise-jwt</a></p>
  <p>When I try to reset password for rails API project, it does not send back JWT token when I successfully change the password.</p>
  <p>Everything is working fine but on password reset/update feature I never get Authorization token upon succeffuly password updation.</p>
  <p>Update method code:</p>
  <pre><code>class Api::V1::Patients::PasswordsController &lt; Devise::PasswordsController
    respond_to :json
  
    skip_before_action :verify_authenticity_token
  
    def update
      self.resource = resource_class.reset_password_by_token(params)
      if resource.errors.empty?
        bypass_sign_in(resource, scope: :patient)
        render json: resource, root: 'data', each_serializer: PatientSerializer, message: 'Password updated successfully', adapter: :json, status: :ok
      else
        render json: { error: resource.errors.full_messages }, status: :not_found
      end
    end
  
    private
  
    def resource_params
      params.require(:patient).permit(:email, :password, :password_confirmation)
    end
  end
  </code></pre>
  <p>Routes:</p>
  <pre><code>namespace :api, defaults: { format: :json } do
      namespace :v1 do
        devise_for :patients, controllers: {
          sessions: 'api/v1/patients/sessions',
          registrations: 'api/v1/patients/registrations',
          passwords: 'api/v1/patients/passwords'
        }
      end
    end
  </code></pre>
  <p>Config:</p>
  <pre><code>config.jwt do |jwt|
      jwt.secret = ENV['DEVISE_JWT_SECRET_KEY']
      jwt.expiration_time = 30.day.to_i
    end
  </code></pre>
  <p>Devise Config:</p>
  <pre><code>config.sign_in_after_reset_password = true
  </code></pre>
  <p>Logs:</p>
  <pre><code>Started PUT &quot;/api/v1/patients/password&quot; for ::1 at 2022-03-05 10:51:14 +0500
  Processing by Api::V1::Patients::PasswordsController#update as JSON
    Parameters: {&quot;password&quot;=&gt;&quot;[FILTERED]&quot;, &quot;password_confirmation&quot;=&gt;&quot;[FILTERED]&quot;, &quot;reset_password_token&quot;=&gt;&quot;[FILTERED]&quot;}
    Patient Load (38.1ms)  SELECT &quot;patients&quot;.* FROM &quot;patients&quot; WHERE &quot;patients&quot;.&quot;reset_password_token&quot; = $1 ORDER BY &quot;patients&quot;.&quot;id&quot; ASC LIMIT $2  [[&quot;reset_password_token&quot;, &quot;32bbaa6ea73b7a49d1abb84c0756b4666f12f95c42c27218d3150b0204e1e909&quot;], [&quot;LIMIT&quot;, 1]]
    ↳ app/controllers/api/v1/patients/passwords_controller.rb:30:in `update'
    TRANSACTION (387.7ms)  BEGIN
    ↳ app/controllers/api/v1/patients/passwords_controller.rb:30:in `update'
    Patient Update (225.8ms)  UPDATE &quot;patients&quot; SET &quot;encrypted_password&quot; = $1, &quot;reset_password_token&quot; = $2, &quot;reset_password_sent_at&quot; = $3, &quot;updated_at&quot; = $4 WHERE &quot;patients&quot;.&quot;id&quot; = $5  [[&quot;encrypted_password&quot;, &quot;$2a$12$XYIP61byGk5XgROhYDP8WuEfn698HTRL/Rv2Y3K/Okt7esT5NyVTW&quot;], [&quot;reset_password_token&quot;, nil], [&quot;reset_password_sent_at&quot;, nil], [&quot;updated_at&quot;, &quot;2022-03-05 05:51:15.618405&quot;], [&quot;id&quot;, 2]]
    ↳ app/controllers/api/v1/patients/passwords_controller.rb:30:in `update'
    TRANSACTION (100.8ms)  COMMIT
    ↳ app/controllers/api/v1/patients/passwords_controller.rb:30:in `update'
  [active_model_serializers]   Address Load (48.1ms)  SELECT &quot;addresses&quot;.* FROM &quot;addresses&quot; WHERE &quot;addresses&quot;.&quot;addressable_id&quot; = $1 AND &quot;addresses&quot;.&quot;addressable_type&quot; = $2 LIMIT $3  [[&quot;addressable_id&quot;, 2], [&quot;addressable_type&quot;, &quot;Patient&quot;], [&quot;LIMIT&quot;, 1]]
  [active_model_serializers]   ↳ app/controllers/api/v1/patients/passwords_controller.rb:33:in `update'
  [active_model_serializers] Rendered PatientSerializer with ActiveModelSerializers::Adapter::Json (1493.45ms)
  Completed 200 OK in 6337ms (Views: 829.0ms | ActiveRecord: 1504.4ms | Allocations: 12243320)
  </code></pre>