CyberDeck / devise-fido-u2f

A devise module to authenticate additionally with a FIDO U2F hardware token, e.g. a Yubico USB security key.
MIT License
35 stars 4 forks source link

devise-fido-u2f interferes with custom Devise::SessionsController#create #11

Open brianewell opened 5 years ago

brianewell commented 5 years ago

Standard Devise actions can be overridden with customized controller code as follows: config/routes.rb:

devise_for :users, controllers: { sessions: 'users/sessions' }

app/controllers/users/sessions_controller.rb:

class Users::SessionsController < Devise::SessionsController
  # POST /resource/sign_in
  def create
    raise 'this should get your attention'
    super
  end
end

After enabling :fido_usf_registerable and :fido_usf_authenticatable in my user model, I found that Users::SessionsController#create was never being called, despite the user still being successfully signed in.

Ruby v2.4.3 Rails v5.1.6 Devise FIDO USF v0.1.9