Open
Description
Environment
- Ruby 3.2.2
- Rails 7.0.5
- Devise 4.9.2
Current behavior
If I overwrite Devise::SessionsController#create in custom controller to not sign in user and just redirect it still signs in the user if login and password are correct. Confirmed on 2 different apps. I think it could be related to implementation of current_user
that calls warden.authenticate
# app/controllers/users/sessions_controller.rb
class Users::SessionsController < Devise::SessionsController
# POST /resource/sign_in
def create
redirect_to root_path
end
end
# config/routes.rb
devise_for :users, controllers: {
sessions: "users/sessions"
}
Expected behavior
It should not sign in the user
Metadata
Metadata
Assignees
Labels
No labels