Module: Devise::Passkeys::Controllers::PasskeysControllerConcern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/passkeys/controllers/passkeys_controller_concern.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
54 55 56 |
# File 'lib/devise/passkeys/controllers/passkeys_controller_concern.rb', line 54 def create create_passkey(resource: resource) end |
#destroy ⇒ Object
69 70 71 72 |
# File 'lib/devise/passkeys/controllers/passkeys_controller_concern.rb', line 69 def destroy @passkey.destroy redirect_to root_path end |
#new_create_challenge ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/devise/passkeys/controllers/passkeys_controller_concern.rb', line 42 def new_create_challenge = ( relying_party: , user_details: user_details_for_registration, exclude: exclude_external_ids_for_registration ) store_challenge_in_session(options_for_registration: ) render json: end |
#new_destroy_challenge ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/devise/passkeys/controllers/passkeys_controller_concern.rb', line 58 def new_destroy_challenge allowed_passkeys = (resource.passkeys - [@passkey]) = (relying_party: , options: { allow: allowed_passkeys.pluck(:external_id) }) store_reauthentication_challenge_in_session(options_for_authentication: ) render json: end |