Repository: goauthentik/authentik

Issue:
Error get_webauthn_challenge_without_user
**Describe the bug**
My passwordless login flow stopped working when I upgraded to 2024.2.0 from 2023.10

**To Reproduce**
Steps to reproduce the behavior:
1. Try to login with passwordless login flow

**Expected behavior**
Be asked to authenticate passkey and be redirected to Authentik.

**Screenshots**
![Screenshot 2024-02-21 at 17 09 47](https://github.com/goauthentik/authentik/assets/51415707/c490400d-6a0b-42bd-8298-cd94d120b4be)


**Logs**
<details>
    <summary>Stacktrace from authentik</summary>

```
Traceback (most recent call last):
  File "/authentik/flows/views/executor.py", line 291, in get
    stage_response = self.current_stage_view.dispatch(request)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/stages/authenticator_validate/stage.py", line 243, in get
    challenges = self.get_webauthn_challenge_without_user()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/stages/authenticator_validate/stage.py", line 216, in get_webauthn_challenge_without_user
    "challenge": get_webauthn_challenge_without_user(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/stages/authenticator_validate/challenge.py", line 72, in get_webauthn_challenge_without_user
    return loads(options_to_json(authentication_options))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/webauthn/helpers/options_to_json.py", line 118, in options_to_json
    auth_to_return["userVerification"] = options.user_verification.value
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
builtins.AttributeError: 'str' object has no attribute 'value'
```
</details>


**Version and Deployment (please complete the following information):**
- authentik version: 2024.2.0
- Deployment: kubernetes

**Additional context**
Passwordless login flow config:
```yaml
context: {}
entries:
- attrs:
    authentication: none
    compatibility_mode: true
    denied_action: message_continue
    designation: authentication
    layout: stacked
    name: Passwordless
    policy_engine_mode: any
    title: "V\xE4lkommen till Authentik!"
  conditions: []
  id: null
  identifiers:
    pk: 7817f152-1a2a-40d4-bc2d-3c748ec68f00
    slug: passwordless
  model: authentik_flows.flow
  state: present
- attrs:
    configuration_stages:
    - 69a2222e-d308-429f-a82e-ba8a52cc3242
    device_classes:
    - webauthn
    last_auth_threshold: seconds=0
    not_configured_action: configure
    webauthn_user_verification: required
  conditions: []
  id: null
  identifiers:
    name: WebAuthn/Duo Auth Stage
    pk: dfa04982-91e4-4907-b9d2-cda07f082924
  model: authentik_stages_authenticator_validate.authenticatorvalidatestage
  state: present
- attrs:
    geoip_binding: no_binding
    network_binding: no_binding
    remember_me_offset: days=7
    session_duration: days=1
  conditions: []
  id: null
  identifiers:
    name: default-authentication-login
    pk: 1f10494c-5874-4542-af8e-3df41de6f5e1
  model: authentik_stages_user_login.userloginstage
  state: present
- attrs:
    evaluate_on_plan: true
    invalid_response_action: retry
    policy_engine_mode: any
  conditions: []
  id: null
  identifiers:
    order: 10
    pk: e7271a1d-8e30-4e74-9d90-9753930938fd
    stage: dfa04982-91e4-4907-b9d2-cda07f082924
    target: 7817f152-1a2a-40d4-bc2d-3c748ec68f00
  model: authentik_flows.flowstagebinding
  state: present
- attrs:
    evaluate_on_plan: true
    invalid_response_action: retry
    policy_engine_mode: any
  conditions: []
  id: null
  identifiers:
    order: 20
    pk: c328bc7b-e25b-45e2-bb0c-d5225cd7400d
    stage: 1f10494c-5874-4542-af8e-3df41de6f5e1
    target: 7817f152-1a2a-40d4-bc2d-3c748ec68f00
  model: authentik_flows.flowstagebinding
  state: present
metadata:
  labels:
    blueprints.goauthentik.io/generated: 'true'
  name: authentik Export - 2024-02-21 16:07:37.605830+00:00
version: 1
```
        


Discussion:
Same for me, just upgraded to 2024.2 and passwordless login is broken with the same error message.
Same issue, passwordless login is now broken with 1password

Resolving patch:
diff --git a/authentik/stages/authenticator_validate/challenge.py b/authentik/stages/authenticator_validate/challenge.py
--- a/authentik/stages/authenticator_validate/challenge.py
+++ b/authentik/stages/authenticator_validate/challenge.py
@@ -65,7 +65,7 @@ def get_webauthn_challenge_without_user(
     authentication_options = generate_authentication_options(
         rp_id=get_rp_id(request),
         allow_credentials=[],
-        user_verification=stage.webauthn_user_verification,
+        user_verification=UserVerificationRequirement(stage.webauthn_user_verification),
     )
     request.session[SESSION_KEY_WEBAUTHN_CHALLENGE] = authentication_options.challenge
 


Test patch:
diff --git a/authentik/stages/authenticator_validate/tests/test_webauthn.py b/authentik/stages/authenticator_validate/tests/test_webauthn.py
--- a/authentik/stages/authenticator_validate/tests/test_webauthn.py
+++ b/authentik/stages/authenticator_validate/tests/test_webauthn.py
@@ -164,8 +164,9 @@ def test_get_challenge_userless(self):
         """Test webauthn (userless)"""
         request = get_request("/")
         stage = AuthenticatorValidateStage.objects.create(
-            name=generate_id(),
+            name=generate_id(), webauthn_user_verification=UserVerification.PREFERRED
         )
+        stage.refresh_from_db()
         WebAuthnDevice.objects.create(
             user=self.user,
             public_key=(