Skip to content

Commit

Permalink
Allowed devices should be an array
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Zanders committed Mar 19, 2024
1 parent 3cb6c4d commit 40501bd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ def options_for_create(relying_party)
@options_for_create ||= relying_party.options_for_registration(
user: { id: user.webauthn_id, name: user.name },
exclude: TwoFactorAuthentication::Device::Webauthn.where(user:).pluck(:webauthn_external_id),
authenticator_selection: { user_verification: 'discouraged' }
authenticator_selection: { user_verification: "discouraged" }
)
end

def options_for_get(relying_party)
@options_for_get ||= relying_party.options_for_authentication(
user_verification: 'discouraged', # we do not require user verification
allow: webauthn_external_id # TODO: Maybe also allow all other tokens? Let's see
user_verification: "discouraged", # we do not require user verification
allow: [webauthn_external_id] # TODO: Maybe also allow all other tokens? Let's see
)
end

Expand Down

0 comments on commit 40501bd

Please sign in to comment.