Skip to content

Commit

Permalink
stages/authenticator_webauthn: fix error when enrolling new device (#…
Browse files Browse the repository at this point in the history
…8738)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu authored Feb 28, 2024
1 parent 1f733b0 commit dd37e8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion authentik/stages/authenticator_webauthn/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from webauthn.helpers.bytes_to_base64url import bytes_to_base64url
from webauthn.helpers.exceptions import InvalidRegistrationResponse
from webauthn.helpers.structs import (
AuthenticatorAttachment,
AuthenticatorSelectionCriteria,
PublicKeyCredentialCreationOptions,
ResidentKeyRequirement,
Expand Down Expand Up @@ -91,7 +92,7 @@ def get_challenge(self, *args, **kwargs) -> Challenge:
# set, cast it to string to ensure it's not a django class
authenticator_attachment = stage.authenticator_attachment
if authenticator_attachment:
authenticator_attachment = str(authenticator_attachment)
authenticator_attachment = AuthenticatorAttachment(str(authenticator_attachment))

registration_options: PublicKeyCredentialCreationOptions = generate_registration_options(
rp_id=get_rp_id(self.request),
Expand Down

0 comments on commit dd37e8b

Please sign in to comment.