Clients generated from OpenAPI specification cannot handle Passkey authentication method #4063
Open
4 of 5 tasks
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
OpenAPI spec for Kratos does not include
passkey
as a valid option for authentication method enum, here:kratos/spec/api.json
Lines 1960 to 1974 in b0111d4
This causes some clients generated with openapi-generator that explicitly try to match enum values against all known valid values (e.g.
csharp
generator withgenerichost
library option, as seen here: https://github.com/leancodepl/dotnet-kratos-client/blob/bbaa34a1e7cd355b0c0c34eaa875096dbd529df2/src/LeanCode.Kratos.Client/Model/KratosSessionAuthenticationMethod.cs#L123-L153) to fail at deserializing sessions which were authenticated using passkeys, and therefore failing to authenticate users using this method.Reproducing the bug
/sessions/whoami
endpoint using that session's token/cookie with generated client and have it deserialize the response.Relevant log output
No response
Relevant configuration
Version
1.2.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
Technically the Kratos version I'm running is v1.2.0 with a custom patch on top of it that enables passkeys for API clients/flows as well. However, it shouldn't matter because the problem was found with a browser client anyway.
The client was actually generated from https://github.com/ory/sdk/blob/master/spec/kratos/v1.2.0.json although it seems like files in both repos have this issue. But I imagine the fix needs to happen here before being propagated to sdk repo so this is where I chose to report this.
The text was updated successfully, but these errors were encountered: