ory / kratos

The most scalable and customizable identity server on the market. Replace your Homegrown, Auth0, Okta, Firebase with better UX and DX. Has all the tablestakes: Passkeys, Social Sign In, Multi-Factor Auth, SMS, SAML, TOTP, and more. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=kratos
Apache License 2.0
11.33k stars 963 forks source link

json: unknown field - use_password_migration_hook #4039

Closed jimmills closed 3 months ago

jimmills commented 3 months ago

Preflight checklist

Ory Network Project

No response

Describe the bug

We upgraded our ory nuget package to version 1.14.3 and our self-hosted ory docker container to use the image 1.12.0. Now, when we call IdentityApi.CreateIdentityAsync() we receive an error the use_password_migration_hook is an unknown field.

Looking at the repo, it looks like version 1.14.1 added the UsePasswordMigrationHook property to the ClientIdentityWithCredentialsPasswordConfig class. However, it appears the API that ships in the 1.12.0 container image doesn't expect this field yet.

Reproducing the bug

  1. Bring up a container on image 1.12.0 of Kratos
  2. Using version 1.14.3 of the c# nuget package call IdentityApi.CreateIdentityAsync with a body created with code resembling this: var body = new ClientCreateIdentityBody( schemaId: "default", state: ClientCreateIdentityBody.StateEnum.Active, traits: new { name = "Name", email = "test@example.com" }, verifiableAddresses: new List { new ClientVerifiableIdentityAddress( value: "test@example.com", verified: true, via: ClientVerifiableIdentityAddress.ViaEnum.Email, status: "completed" ) }, credentials: new ClientIdentityWithCredentials( password: new ClientIdentityWithCredentialsPassword( config: new ClientIdentityWithCredentialsPasswordConfig( password: "apasswordofsomesort1" ) ) ) );

Relevant log output

Error calling CreateIdentity: {"error":{"code":400,"status":"Bad Request","message":"json: unknown field \"use_password_migration_hook\""}}

Relevant configuration

No response

Version

nuget package 1.14.2, docker image 1.12.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker

Additional Context

No response

alnr commented 3 months ago

Please see https://github.com/ory/sdk#ory-self-hosted-sdks