Skip to content

NET Client (NuGet 1.20.11) fails to deserialize sessions with passkey authentication method #4526

@phi-luong-codeleap

Description

@phi-luong-codeleap

Preflight checklist

Ory Network Project

No response

Describe the bug

Description:

I’m using the latest NuGet package Ory.Client 1.20.11, and I’m hitting a deserialization error when a session contains passkey as an authentication method.

Expected behavior:
The client should accept passkey as a valid value for authentication_methods[].method, alongside password, oidc, totp, webauthn, etc.

Actual behavior:
The generated MethodEnum in Ory.Client 1.20.11 does not include passkey. As a result, JSON deserialization fails whenever a session includes a passkey login.

Background:

  • The API schema explicitly allows passkey as a valid value.
  • The SDKs are auto‑generated from the OpenAPI spec.
  • This indicates the published .NET client on NuGet is out of sync with the current API schema regarding this enum.

Impact:

  • Any attempt to list sessions for users with passkey enabled results in a runtime error.

Suggested fix:

  • Regenerate the .NET client SDK so that MethodEnum includes passkey.
  • Publish an updated NuGet package.

Reproducing the bug

Steps to reproduce:

  1. Register a user with passkey as 2FA.
  2. Call List Sessions or Get User Sessions using Ory.Client 1.20.11.
  3. Observe deserialization error above.

Relevant log output

Error converting value "passkey" to type 'System.Nullable`1[Ory.Client.Model.ClientSessionAuthenticationMethod+MethodEnum]'.
Path '[16].authentication_methods[0].method', line 1, position 18644.

Relevant configuration

**Environment:**
- Ory.Client NuGet: 1.20.11  
- .NET runtime: [add your version here]  
- API: Ory Session API

Version

1.20.11

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Kubernetes with Helm

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