Class: Devise::TwoFactorAuthenticationsController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::TwoFactorAuthenticationsController
- Defined in:
- app/controllers/devise/two_factor_authentications_controller.rb
Instance Method Summary collapse
Instance Method Details
#create {|resource| ... } ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/devise/two_factor_authentications_controller.rb', line 17 def create self.resource = warden.authenticate!() :notice, :signed_in, scope: :"devise.sessions" sign_in(resource_name, resource) yield resource if block_given? respond_with resource, location: after_sign_in_path_for(resource) end |
#new ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/devise/two_factor_authentications_controller.rb', line 9 def new @options = WebAuthn::Credential.( allow: @resource.webauthn_credentials.pluck(:external_id), user_verification: "discouraged" ) session[:two_factor_authentication_challenge] = @options.challenge end |