Class: PasskeysRails::FinishRegistration
- Inherits:
-
Object
- Object
- PasskeysRails::FinishRegistration
- Includes:
- Interactor, AuthenticatableCreator
- Defined in:
- app/interactors/passkeys_rails/finish_registration.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/interactors/passkeys_rails/finish_registration.rb', line 9 def call verify_credential! agent.transaction do store_passkey_and_register_agent! create_authenticatable! if aux_class_name.present? end context.agent = agent context.username = agent.username context.auth_token = GenerateAuthToken.call!(agent:).auth_token rescue Interactor::Failure => e context.fail! code: e.context.code, message: e.context. end |