Skip to content

.NET SDK chokes on webauthn UI input node #444

@lol768

Description

@lol768

Preflight checklist

Ory Network Project

No response

Describe the bug

Kratos sends:

{"name":"identifier","type":"text","value":"","required":true,"autocomplete":"username webauthn","disabled":false,"node_type":"input"}

Resulting in:

Newtonsoft.Json.JsonSerializationException: Error converting value "username webauthn" to type 'System.Nullable`1[Ory.Kratos.Client.Model.KratosUiNodeInputAttributes+AutocompleteEnum]'. Path 'autocomplete', line 1, position 96.
 ---> System.ArgumentException: Requested value 'username webauthn' was not found.
   at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)

Which then gets shadowed by this much less useful exception:

The JSON string `...` cannot be deserialized into any schema defined

Reproducing the bug

Enable webauthn method under selfservice->methods->webauthn, e.g.

    webauthn:
      config:
        passwordless: true
        rp:
          display_name: Test
          # Set 'id' to the top-level domain.
          id: localhost
          # Set 'origin' to the exact URL of the page that prompts the user to use WebAuthn. You must include the scheme, host, and port.
          origin: http://localhost:4455
      enabled: true

Create a login flow, try to get the .NET SDK to deserialise it.

Relevant log output

Relevant configuration

Version

Kratos v1.3.1; NuGet Ory.Kratos.Client v1.3.8

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

None

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions