Class: Booth::Webauth::OptionsForCreate

Inherits:
Object
  • Object
show all
Includes:
MethodObject
Defined in:
lib/booth/webauth/options_for_create.rb

Instance Method Summary collapse

Methods included from MethodObject

included

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/booth/webauth/options_for_create.rb', line 11

def call
  verify_setup

  ::WebAuthn::Credential.options_for_create(
    user: {
      id: webauthn_id,
      name: username
      # Also supports `display_name: "..."`
    },
    authenticator_selection: { user_verification: },
    # Use the following instead, if you want to force device-internal authenticators and forbid USB etc.
    # authenticator_selection: { user_verification:, authenticator_attachment: 'platform' },
    exclude: device_ids_to_exclude
  )
end