Skip to content

Commit

Permalink
Merge pull request #149 from duo-labs/fix/update-webauthn-v2.4.0
Browse files Browse the repository at this point in the history
fix/update-webauthn-v2.4.0
  • Loading branch information
MasterKale authored Dec 5, 2024
2 parents fad5eb3 + c388eb4 commit 0e805a3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions _app/homepage/services/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
AuthenticatorSelectionCriteria,
AuthenticatorAttachment,
PublicKeyCredentialDescriptor,
PublicKeyCredentialHint,
ResidentKeyRequirement,
)
from webauthn.helpers.cose import COSEAlgorithmIdentifier
Expand Down Expand Up @@ -110,6 +111,8 @@ def generate_registration_options(
if "rs256" in algorithms:
supported_pub_key_algs.append(COSEAlgorithmIdentifier.RSASSA_PKCS1_v1_5_SHA_256)

_hints = [PublicKeyCredentialHint(hint) for hint in hints]

registration_options = generate_registration_options(
rp_id=settings.RP_ID,
rp_name=settings.RP_NAME,
Expand All @@ -125,6 +128,7 @@ def generate_registration_options(
)
for cred in existing_credentials
],
hints=_hints,
)

# py_webauthn will default to all supported algorithms on an empty `algorithms` list
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e805a3

Please sign in to comment.