Skip to content

Commit

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

stages/authenticator_webauthn: fix error when enrolling new device (#8738)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L <jens@goauthentik.io>
  • Loading branch information
gcp-cherry-pick-bot[bot] and BeryJu authored Feb 28, 2024
1 parent 2270629 commit 76ad2c8
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 76ad2c8

Please sign in to comment.