ory/sdk

Rust Ory-Kratos-Client is outdated

Opened this issue · 3 comments

Preflight checklist

Ory Network Project

No response

Describe the bug

I can't remember why I needed to use it, but this repo and the version on crates io are a few months out of date. I'm now using the ory-client package now so this is not a blocker for me at the moment.

For example IdentityCredentialsType is missing the "Code", "LinkRecovery", and "CodeRecovery" variants of TypeEnum which replaced it. This can cause a runtime Serde error when calling the create_identity admin api and one of those variants is returned.

Reproducing the bug

Observe that the API version of ory-kratos-client is 1.0.0. Observe that the API version of ory-client is 1.6.1.

Relevant log output

No response

Relevant configuration

No response

Version

1.0.0

On which operating system are you observing this issue?

Ory Network

In which environment are you deploying?

Ory Network

Additional Context

No response

sjud commented

The ory-kratos-client was rebuilt last week, but I wanted to document some inconsistencies here

LoginFlow
https://docs.rs/ory-kratos-client/latest/ory_kratos_client/models/login_flow/struct.LoginFlow.html
field ui : UiContainer
https://docs.rs/ory-kratos-client/latest/ory_kratos_client/models/ui_container/struct.UiContainer.html
has a vec of type UiNode
https://docs.rs/ory-kratos-client/latest/ory_kratos_client/models/ui_node/struct.UiNode.html
which has an UiNodeAttributes enum
https://docs.rs/ory-kratos-client/latest/ory_kratos_client/models/ui_node_attributes/enum.UiNodeAttributes.html

This enum doesn't have node_type in it's fields so it can't serialize the response from
https://www.ory.sh/docs/reference/api#tag/frontend/operation/getLoginFlow
which expects node_type
Alternatively there were 5 specific models generated, which were not part of an enum.
All of which have node_type. For instance, the input ui node.
https://docs.rs/ory-kratos-client/latest/ory_kratos_client/models/ui_node_input_attributes/struct.UiNodeInputAttributes.html#structfield.node_type
Unfortunately AFAIK those types are not actually used anywhere.

This issue is known and has been around for quite some time. It is blocked on an upstream fix.

#325 (comment).

Leaving this issue open as the client is still months behind the current version

sjud commented

This issue is known and has been around for quite some time. It is blocked on an upstream fix.

#325 (comment).

Leaving this issue open as the client is still months behind the current version

Thanks, yes the node_type change ended up being the solution. I missed that issue thanks for linking it. :)